Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Dmytro Kulyk <[email protected]>
  • Loading branch information
berezhinskiy and KulykDmytro authored Jul 22, 2024
1 parent 653f00f commit 36d914c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ecoflow_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,7 @@ def get_metric_by_ecoflow_payload_key(self, ecoflow_payload_key):

def process_payload(self, params):
log.debug(f"Processing params: {params}")
for ecoflow_payload_key in params.keys():
ecoflow_payload_value = params[ecoflow_payload_key]
for ecoflow_payload_key, ecoflow_payload_value in params.items():
if not isinstance(ecoflow_payload_value, (int, float)):
log.warning(f"Skipping unsupported metric {ecoflow_payload_key}: {ecoflow_payload_value}")
continue
Expand Down

0 comments on commit 36d914c

Please sign in to comment.