Browse Source

Get rid of yaml warnings

Nathaniel van Diepen 4 years ago
parent
commit
8027c1c9f3
1 changed files with 2 additions and 2 deletions
  1. 2 2
      backup.py

+ 2 - 2
backup.py

@@ -122,7 +122,7 @@ def config():
 
     with pushd('etc/backup.d'):
         with open("backup.yml") as f:
-            config._handle = yaml.load(f)
+            config._handle = yaml.load(f, Loader=yaml.SafeLoader)
 
     return config._handle
 
@@ -138,7 +138,7 @@ def sources():
             for path in glob('{}/*.yml'.format(source)):
                 path = os.path.realpath(path)
                 with pushd(os.path.dirname(path)), open(path) as f:
-                    data = yaml.load(f)
+                    data = yaml.load(f, Loader=yaml.SafeLoader)
                     if "active" in data and data["active"]:
                         data['path'] = path
                         if "depends" not in data: