summaryrefslogtreecommitdiff
path: root/compose
diff options
context:
space:
mode:
authorrealityone <realityone@me.com>2016-10-14 18:20:55 +0800
committerrealityone <realityone@me.com>2016-10-14 18:20:55 +0800
commit22d91f60bea78cbe232a1ac86ba747930ecf7d1a (patch)
treee41880faed3063a0283ed4f317ac77f18877f5a0 /compose
parente4bb9bde30655e9024d5453c5843e1f531a96485 (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.py2
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']))