Skip to content

Commit

Permalink
Allow log flushing to fail in nat-lab (#937)
Browse files Browse the repository at this point in the history
  • Loading branch information
ThrasherLT authored Nov 11, 2024
1 parent 6f38aea commit f4920a9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Empty file.
11 changes: 10 additions & 1 deletion nat-lab/tests/telio.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,16 @@ async def on_stderr(stderr: str) -> None:

print(datetime.now(), "Test cleanup: Shutting down")
if self._libtelio_proxy:
await self.get_proxy().flush_logs()
# flush_logs() is allowed to fail here:
try:
await self.get_proxy().flush_logs()
# Since this is clean up code, catching general exceptions is fine:
except Exception as e: # pylint: disable=broad-exception-caught
print(
datetime.now(),
f"Test cleanup: Exception while flushing logs: {e}",
)

await self.get_proxy().shutdown(self._connection.target_name())
else:
print(
Expand Down

0 comments on commit f4920a9

Please sign in to comment.