Skip to content

Commit 55b59f7

Browse files
Fix YAML Load error
1 parent ea90218 commit 55b59f7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

scripts/generate_sensors.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,10 @@ def generateSensorsForAnalytics(analytics, sensor_dict):
112112
data_models = []
113113
for dmf in data_model_files:
114114
print("working on {}".format(dmf))
115-
data_models.append(yaml.load(open(dmf).read()))
115+
with open(dmf) as d:
116+
data_files = yaml.safe_load(d)
117+
data_models.append(data_files)
118+
#data_models.append(yaml.load(open(dmf).read()))
116119
#data_models = [yaml.load(open(data_model_file).read()) for data_model_file in data_model_files]
117120

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

0 commit comments

Comments
 (0)