Przeglądaj źródła

Merge pull request #219 from aznashwan/pyyaml6

Fix Ubuntu OSMorphing cloud config YAML loading for PyYAML 6+.
Nashwan Azhari 4 lat temu
rodzic
commit
0e36502fed
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      coriolis/osmorphing/ubuntu.py

+ 2 - 1
coriolis/osmorphing/ubuntu.py

@@ -60,7 +60,8 @@ class BaseUbuntuMorphingTools(debian.BaseDebianMorphingTools):
 
             config_contents = self._read_file(config_path_chroot)
             config_data = yaml.load(
-                io.StringIO(config_contents.decode("utf-8")))
+                io.StringIO(config_contents.decode("utf-8")),
+                Loader=yaml.SafeLoader)
 
             config_network_data = config_data.get("network")
             if config_network_data is None: