Browse Source

Fix setting weight of upgraded profile

self._weight sometimes becomes an int, and ConfigParser does not like ints.
fieldOfView 8 years ago
parent
commit
86ad1777af
1 changed files with 1 additions and 1 deletions
  1. 1 1
      plugins/VersionUpgrade/VersionUpgrade21to22/Profile.py

+ 1 - 1
plugins/VersionUpgrade/VersionUpgrade21to22/Profile.py

@@ -99,7 +99,7 @@ class Profile:
         else:
             config.set("metadata", "type", "quality")
         if self._weight:
-            config.set("metadata", "weight", self._weight)
+            config.set("metadata", "weight", str(self._weight))
         if self._machine_variant_name:
             if self._machine_type_id:
                 config.set("metadata", "variant", VersionUpgrade21to22.VersionUpgrade21to22.VersionUpgrade21to22.translateVariant(self._machine_variant_name, self._machine_type_id))