Restore retries

main2
Bob Mottram 2019-10-16 22:01:28 +01:00
parent 6ddf5aa0dc
commit 26d81add1e
1 changed files with 11 additions and 14 deletions

View File

@ -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':