From ee1c614eda833b38ad0d526b4b1e493dfe5968be Mon Sep 17 00:00:00 2001 From: Jens Harbott Date: Sat, 16 Oct 2021 17:33:12 +0200 Subject: [PATCH] Fix use of yaml.load() The use of this function has been deprecated for a long time[0]. With PyYAML==6.0 the call is now failing, so replace it with the safe version. [0] https://msg.pyyaml.org/load Signed-off-by: Jens Harbott Change-Id: I7a170262b50a5c80a516095b872d52e1bea5479d --- tools/update_clouds_yaml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/update_clouds_yaml.py b/tools/update_clouds_yaml.py index 7be995e8f3..74dcdb2a07 100755 --- a/tools/update_clouds_yaml.py +++ b/tools/update_clouds_yaml.py @@ -65,7 +65,7 @@ class UpdateCloudsYaml(object): def _read_clouds(self): try: with open(self._clouds_path) as clouds_file: - self._clouds = yaml.load(clouds_file) + self._clouds = yaml.safe_load(clouds_file) except IOError: # The user doesn't have a clouds.yaml file. print("The user clouds.yaml file didn't exist.")