Explorar el Código

Fix Ubuntu OSMorphing cloud config YAML loading for PyYAML 6+.

Nashwan Azhari hace 4 años
padre
commit
ae6eb934ad
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  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: