Skip to content

Commit

Permalink
Add exception handling in the destructor scan/rule.py
Browse files Browse the repository at this point in the history
Signed-off-by: Shounak Dey <[email protected]>
  • Loading branch information
sdglitched committed Oct 28, 2024
1 parent d7a32e3 commit 5099fae
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions gi_loadouts/face/scan/rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,11 @@ def __del__(self):
This is not likely to cause major problems but still, this is not the right approach and
should be rectified at the earliest, no matter how small of a use-case this might be.
"""
if isinstance(self.thread, QThread):
self.thread.terminate()
try:
if isinstance(self.thread, QThread):
self.thread.terminate()
except RuntimeError:
return

def populate_dropdown(self) -> None:
"""
Expand Down

0 comments on commit 5099fae

Please sign in to comment.