Skip to content

Commit

Permalink
Fixing YAML loading errors
Browse files Browse the repository at this point in the history
  • Loading branch information
alexiacrumpton authored Feb 29, 2024
1 parent 850ce52 commit ea90218
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/generate_sensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def generateSensorsForAnalytics(analytics, sensor_dict):

# Get all analytics and load as list of dicts
analytics_files = glob.glob(path.join(path.dirname(__file__), "..", "analytics", "*.yaml"))
analytics = []
for analytic_file in analytics_files:
with open(analytic_file) as af:
analytic_data = yaml.safe_load(af)
Expand All @@ -99,6 +100,7 @@ def generateSensorsForAnalytics(analytics, sensor_dict):
# Get all sensor mappings and load as a list of dicts
mapping_files = glob.glob(path.join(path.dirname(__file__), "..", "sensors", "*.yaml"))
print("detected the following sensors: {}".format(str(mapping_files)))
mappings = []
for mapping_file in mapping_files:
with open(mapping_file, encoding='utf-8') as mf:
mapping_data = yaml.safe_load(mf)
Expand Down

0 comments on commit ea90218

Please sign in to comment.