Skip to content

Commit

Permalink
Fix YAML Load error
Browse files Browse the repository at this point in the history
  • Loading branch information
alexiacrumpton authored Feb 29, 2024
1 parent ea90218 commit 55b59f7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/generate_sensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ def generateSensorsForAnalytics(analytics, sensor_dict):
data_models = []
for dmf in data_model_files:
print("working on {}".format(dmf))
data_models.append(yaml.load(open(dmf).read()))
with open(dmf) as d:
data_files = yaml.safe_load(d)
data_models.append(data_files)
#data_models.append(yaml.load(open(dmf).read()))
#data_models = [yaml.load(open(data_model_file).read()) for data_model_file in data_model_files]

# Parse each analytic to find its data model references (if any)
Expand Down

0 comments on commit 55b59f7

Please sign in to comment.