File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -337,15 +337,15 @@ def create_host_config(
337
337
volumes_from = volumes_from .split (',' )
338
338
host_config ['VolumesFrom' ] = volumes_from
339
339
340
- if binds :
340
+ if binds is not None :
341
341
host_config ['Binds' ] = convert_volume_binds (binds )
342
342
343
- if port_bindings :
343
+ if port_bindings is not None :
344
344
host_config ['PortBindings' ] = convert_port_bindings (
345
345
port_bindings
346
346
)
347
347
348
- if extra_hosts :
348
+ if extra_hosts is not None :
349
349
if isinstance (extra_hosts , dict ):
350
350
extra_hosts = [
351
351
'{0}:{1}' .format (k , v )
@@ -354,7 +354,7 @@ def create_host_config(
354
354
355
355
host_config ['ExtraHosts' ] = extra_hosts
356
356
357
- if links :
357
+ if links is not None :
358
358
if isinstance (links , dict ):
359
359
links = six .iteritems (links )
360
360
@@ -370,7 +370,7 @@ def create_host_config(
370
370
formatted .append ({'Key' : k , 'Value' : str (v )})
371
371
lxc_conf = formatted
372
372
373
- if lxc_conf :
373
+ if lxc_conf is not None :
374
374
host_config ['LxcConf' ] = lxc_conf
375
375
376
376
return host_config
You can’t perform that action at this time.
0 commit comments