浏览代码

upgrade: fix problem with missing profiles

Mikael Magnusson 2 年之前
父节点
当前提交
5b44487b35
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      scripts/upgrade.py

+ 1 - 2
scripts/upgrade.py

@@ -28,7 +28,6 @@ def find_source_image(client, image):
 def copy_config(old, new):
         new.devices = old.devices
         new.description = old.description
-        new.profiles = old.profiles
         new_config = new.config
 
         for key, value in old.config.items():
@@ -160,7 +159,7 @@ def main(argv):
                 old.start(wait=True)
 
         new_source = find_source_image(client, new_image)
-        new_config = {'name': new_name, 'source': new_source}
+        new_config = {'name': new_name, 'source': new_source, 'profiles': old.profiles}
 
         if is_allow_existing and client.containers.exists(new_name):
                 new = Container(client.containers.get(new_name))