mirror of https://gitlab.com/bashrc2/epicyon
Restore retries
parent
6ddf5aa0dc
commit
26d81add1e
25
threads.py
25
threads.py
|
@ -44,20 +44,17 @@ class threadWithTrace(threading.Thread):
|
|||
self.isStarted=True
|
||||
|
||||
def __run(self):
|
||||
sys.settrace(self.globaltrace)
|
||||
self.__run_backup()
|
||||
self.run = self.__run_backup
|
||||
#tries=0
|
||||
#while tries<3:
|
||||
# try:
|
||||
# sys.settrace(self.globaltrace)
|
||||
# self.__run_backup()
|
||||
# self.run = self.__run_backup
|
||||
# break
|
||||
# except Exception as e:
|
||||
# print('ERROR: threads.py/__run failed - '+str(e))
|
||||
# time.sleep(1)
|
||||
# tries+=1
|
||||
tries=0
|
||||
while tries<3:
|
||||
try:
|
||||
sys.settrace(self.globaltrace)
|
||||
self.__run_backup()
|
||||
self.run = self.__run_backup
|
||||
break
|
||||
except Exception as e:
|
||||
print('ERROR: threads.py/__run failed - '+str(e))
|
||||
time.sleep(1)
|
||||
tries+=1
|
||||
|
||||
def globaltrace(self, frame, event, arg):
|
||||
if event == 'call':
|
||||
|
|
Loading…
Reference in New Issue