Remove unnecessary check since validate method already checks this

This commit is contained in:
Preetha Appan
2017-11-06 19:42:38 -06:00
parent 85c5218b78
commit b0c03e45ff

View File

@@ -1049,13 +1049,11 @@ func (d *DockerDriver) createContainerConfig(ctx *ExecContext, task *structs.Tas
if len(driverConfig.Devices) > 0 {
var devices []docker.Device
for _, device := range driverConfig.Devices {
if device.HostPath != "" {
dev := docker.Device{
PathOnHost: device.HostPath,
PathInContainer: device.ContainerPath,
CgroupPermissions: device.CgroupPermissions}
devices = append(devices, dev)
}
dev := docker.Device{
PathOnHost: device.HostPath,
PathInContainer: device.ContainerPath,
CgroupPermissions: device.CgroupPermissions}
devices = append(devices, dev)
}
hostConfig.Devices = devices
}