"""
Migrate config to docker hosts list
"""
import os
import sys
import yaml


filename = os.path.join('data', 'configs.yaml')
try:
    with open(filename) as handle:
        data = yaml.load(handle)
except FileNotFoundError:
    # This is fine; will fail for new installs
    sys.exit(0)

host = data.pop('docker_host')
data['docker_hosts'] = [host]

with open(filename, 'w') as handle:
    yaml.dump(data, handle, default_flow_style=False)

@@ -51,19 +51,8 @@
  os%0A
-import sys%0A
 impo
@@ -186,98 +186,12 @@
 le)%0A
-except FileNotFoundError:%0A    # This is fine; will fail for new installs%0A    sys.exit(0)%0A%0A
+    
 host
@@ -217,16 +217,20 @@
 _host')%0A
+    
 data%5B'do
@@ -252,16 +252,20 @@
 %5Bhost%5D%0A%0A
+    
 with ope
@@ -288,24 +288,28 @@
  as handle:%0A
+    
     yaml.dum
@@ -350,8 +350,45 @@
 =False)%0A
+%0Aexcept FileNotFoundError:%0A    pass%0A%0A

Fix the 0002 migration