--- a/runtime/Worker.py Fri Oct 28 14:07:13 2022 +0800
+++ b/runtime/Worker.py Fri Oct 28 15:56:01 2022 +0800
@@ -8,11 +8,9 @@
# See COPYING.Runtime file for copyrights details.
-import sys
from threading import Lock, Condition, Thread
-import six
-from six.moves import _thread
+import _thread
class job(object):
@@ -33,9 +31,9 @@
call, args, kwargs = self.job
self.result = call(*args, **kwargs)
self.success = True
- except Exception:
+ except Exception as e:
self.success = False
- self.exc_info = sys.exc_info()
+ self.exc_info = e
class worker(object):
@@ -60,10 +58,7 @@
reraise exception happend in a job
@param job: job where original exception happend
"""
- exc_type = job.exc_info[0]
- exc_value = job.exc_info[1]
- exc_traceback = job.exc_info[2]
- six.reraise(exc_type, exc_value, exc_traceback)
+ raise job.exc_info
def runloop(self, *args, **kwargs):
"""