Skip to content

Commit

Permalink
Fix deprecated YAML loading.
Browse files Browse the repository at this point in the history
  • Loading branch information
knadh committed Oct 26, 2021
1 parent 4807c6f commit 215944e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dirmaker/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class Builder:

def __init__(self, config_file):
with open(config_file, "r") as f:
self.config = {**self.config, **yaml.load(f.read())}
self.config = {**self.config, **yaml.load(f.read(), Loader=yaml.FullLoader)}

def build(self, outdir):
# Create the output diretory.
Expand All @@ -89,7 +89,7 @@ def load_data(self, infile):
"""Loads entries from the YAML data file."""
entries = []
with open(infile, "r") as f:
items = yaml.load(f.read())
items = yaml.load(f.read(), Loader=yaml.FullLoader)
if type(items) is not list or len(items) == 0:
return []

Expand Down

0 comments on commit 215944e

Please sign in to comment.