Skip to content

Commit

Permalink
Update tests and process for exception handling
Browse files Browse the repository at this point in the history
Signed-off-by: Zelin Hao <zelinhao@amazon.com>
  • Loading branch information
zelinh committed Jul 25, 2023
1 parent 4205074 commit 235a4b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/system/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def terminate(self) -> int:
if self.stdout.name == item.path:
raise Exception(f"stdout {item} is being used by process {proc}")
except Exception as err:
logging.warning(f"{err.args}")
logging.error(f"{err.args}")
os.unlink(self.stdout.name)
self.stdout = None

Expand All @@ -83,7 +83,7 @@ def terminate(self) -> int:
if self.stderr.name == item.path:
raise Exception(f"stderr {item} is being used by process {proc}")
except Exception as err:
logging.warning(f"{err.args}")
logging.error(f"{err.args}")
os.unlink(self.stderr.name)
self.stderr = None

Expand Down

0 comments on commit 235a4b5

Please sign in to comment.