Browse Source

Move v1-v2 config normalization to separate function.

Signed-off-by: Joffrey F <[email protected]>
Joffrey F 9 years ago
parent
commit
46a474ecd9
1 changed files with 4 additions and 0 deletions
  1. 4 0
      compose/config/config.py

+ 4 - 0
compose/config/config.py

@@ -504,6 +504,10 @@ def finalize_service(service_config):
     if 'restart' in service_dict:
         service_dict['restart'] = parse_restart_spec(service_dict['restart'])
 
+    return normalize_v1_service_format(service_dict)
+
+
+def normalize_v1_service_format(service_dict):
     if 'log_driver' in service_dict or 'log_opt' in service_dict:
         if 'logging' not in service_dict:
             service_dict['logging'] = {}