Skip to content

Commit

Permalink
fix shadowed variable
Browse files Browse the repository at this point in the history
  • Loading branch information
rafzi authored Jun 28, 2022
1 parent cd6ed98 commit aac1fc3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mlonmcu/session/postprocess/postprocesses.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,10 +387,10 @@ def file2colname(self):
def post_run(self, report, artifacts):
"""Called at the end of a run."""
for filename, colname in self.file2colname.items():
artifacts = lookup_artifacts(artifacts, name=filename, first_only=True)
if not artifacts:
matches = lookup_artifacts(artifacts, name=filename, first_only=True)
if not matches:
report.main_df[colname] = ""
return
if artifacts[0].fmt != ArtifactFormat.TEXT:
if matches[0].fmt != ArtifactFormat.TEXT:
raise RuntimeError("Can only put text into report columns")
report.main_df[colname] = artifacts[0].content
report.main_df[colname] = matches[0].content

0 comments on commit aac1fc3

Please sign in to comment.