diff options
author | realityone <realityone@me.com> | 2016-10-14 18:20:55 +0800 |
---|---|---|
committer | realityone <realityone@me.com> | 2016-10-14 18:20:55 +0800 |
commit | 22d91f60bea78cbe232a1ac86ba747930ecf7d1a (patch) | |
tree | e41880faed3063a0283ed4f317ac77f18877f5a0 /compose | |
parent | e4bb9bde30655e9024d5453c5843e1f531a96485 (diff) |
fix serialize restart spec with null string
Signed-off-by: realityone <realityone@me.com>
Diffstat (limited to 'compose')
-rw-r--r-- | compose/config/types.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compose/config/types.py b/compose/config/types.py index 9664b580..c450a0f9 100644 --- a/compose/config/types.py +++ b/compose/config/types.py @@ -93,6 +93,8 @@ def parse_restart_spec(restart_config): def serialize_restart_spec(restart_spec): + if not restart_spec: + return '' parts = [restart_spec['Name']] if restart_spec['MaximumRetryCount']: parts.append(six.text_type(restart_spec['MaximumRetryCount'])) |