Skip to content

Commit

Permalink
Merge pull request #325 from krai/fix-power-whitespace
Browse files Browse the repository at this point in the history
Ignore trailing whitespace lines in spl.txt files
  • Loading branch information
araghun authored Jan 26, 2024
2 parents 618732c + 8d5d010 commit f5ee305
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions compliance/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,8 @@ def get_avg_power(power_path: str, run_path: str) -> Tuple[float, float]:

with open(spl_fname) as f:
for line in f:
if not line.startswith("Time"):
continue
timestamp = (
datetime.strptime(line.split(",")[1], datetime_format)
).replace(tzinfo=timezone.utc)
Expand Down

0 comments on commit f5ee305

Please sign in to comment.