mirror of https://github.com/docker/compose.git
Prevent null logging options in `docker-compose config` output
Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
parent
b893797e03
commit
b2a3566cf5
|
@ -1044,8 +1044,8 @@ def merge_logging(base, override):
|
||||||
md.merge_scalar('driver')
|
md.merge_scalar('driver')
|
||||||
if md.get('driver') == base.get('driver') or base.get('driver') is None:
|
if md.get('driver') == base.get('driver') or base.get('driver') is None:
|
||||||
md.merge_mapping('options', lambda m: m or {})
|
md.merge_mapping('options', lambda m: m or {})
|
||||||
else:
|
elif override.get('options'):
|
||||||
md['options'] = override.get('options')
|
md['options'] = override.get('options', {})
|
||||||
return dict(md)
|
return dict(md)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1864,7 +1864,6 @@ class ConfigTest(unittest.TestCase):
|
||||||
'image': 'alpine:edge',
|
'image': 'alpine:edge',
|
||||||
'logging': {
|
'logging': {
|
||||||
'driver': 'syslog',
|
'driver': 'syslog',
|
||||||
'options': None
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue