Skip to content

Commit

Permalink
Fix utils.py to build on mac
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenklar committed May 29, 2024
1 parent f7d3210 commit 286dd30
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions build/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ def filter_row(row, simulation_round, product, category=None, sector=None):


def read_definitions_file(file_path):
return yaml.load(file_path.read_text(encoding='utf-8'), Loader=yaml.CSafeLoader)

try:
return yaml.load(file_path.read_text(encoding='utf-8'), Loader=yaml.CSafeLoader)
except AttributeError:
return yaml.load(file_path.read_text(encoding='utf-8'), Loader=yaml.SafeLoader)

def read_definitions():
definitions_path = Path('definitions')
Expand Down

0 comments on commit 286dd30

Please sign in to comment.