Skip to content

Commit

Permalink
Fix bug with deleting reports (#372)
Browse files Browse the repository at this point in the history
* Allow ARP from 0.0.0.0

* Fix logic

* Fix deleting report
  • Loading branch information
jboddey authored Apr 5, 2024
1 parent 61e69f1 commit f51aaf5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions framework/python/src/common/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ def get_reports(self):

def remove_report(self, timestamp: datetime):
for report in self.reports:
if report.get_started() == timestamp:
if report.get_started().strftime('%Y-%m-%dT%H:%M:%S') == timestamp:
self.reports.remove(report)
break
return

def to_dict(self):
"""Returns the device as a python dictionary. This is used for the
Expand Down
1 change: 1 addition & 0 deletions framework/python/src/core/testrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ def delete_report(self, device: Device, timestamp):
if report_folder == timestamp:
shutil.rmtree(os.path.join(reports_folder, report_folder))
device.remove_report(timestamp)
LOGGER.debug('Successfully deleted the report')
return True

return False
Expand Down

0 comments on commit f51aaf5

Please sign in to comment.