Replace yaml.load by yaml.safe_load
[osm/NBI.git] / osm_nbi / auth.py
index 139c165..0b3264f 100644 (file)
@@ -283,7 +283,7 @@ class Authenticator:
             (r for r in records if r["name"] == "system_admin"), None
         ):
             with open(self.roles_to_operations_file, "r") as stream:
             (r for r in records if r["name"] == "system_admin"), None
         ):
             with open(self.roles_to_operations_file, "r") as stream:
-                roles_to_operations_yaml = yaml.load(stream, Loader=yaml.Loader)
+                roles_to_operations_yaml = yaml.safe_load(stream)
 
             role_names = []
             for role_with_operations in roles_to_operations_yaml["roles"]:
 
             role_names = []
             for role_with_operations in roles_to_operations_yaml["roles"]: