Skip to content

Commit

Permalink
"Temporary" fix for lack of error handling in Queue
Browse files Browse the repository at this point in the history
  • Loading branch information
0cyn committed Jul 3, 2023
1 parent 596404b commit bf1dcaa
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/ktool/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

import pkg_resources

import katlib.log as log

try:
KTOOL_VERSION = pkg_resources.get_distribution('k2l').version
except pkg_resources.DistributionNotFound:
Expand Down Expand Up @@ -177,7 +179,13 @@ def __init__(self):
self.multithread = False

def process_item(self, item: QueueItem):
return item.func(*item.args)
try:
return item.func(*item.args)
except Exception as ex:
if not ignore.OBJC_ERRORS:
raise ex
log.log.error("Queueitem failed to process for some unhandled reason.")
return None

def go(self):
if self.multithread:
Expand Down

0 comments on commit bf1dcaa

Please sign in to comment.