Skip to content

Commit

Permalink
Merge pull request #51 from crcornwell/master
Browse files Browse the repository at this point in the history
specify the loader in yaml.load call
  • Loading branch information
heavenshell authored May 4, 2019
2 parents b065799 + 3c0fe47 commit 9c3f6f6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sqlalchemy_seed/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
import os

import yaml
try:
from yaml import CLoader as Loader
except ImportError:
from yaml import Loader

__version__ = '0.1.1'

Expand Down Expand Up @@ -59,7 +63,7 @@ def load_fixture_files(paths, files):

with open(fixture_path, 'r') as f:
if file.endswith('.yaml') or file.endswith('.yml'):
data = yaml.load(f)
data = yaml.load(f, Loader=Loader)
elif file.endswith('.json'):
data = json.loads(f)
else:
Expand Down

0 comments on commit 9c3f6f6

Please sign in to comment.