mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Update util.py
This commit is contained in:
parent
c168feea32
commit
328cabead6
@ -4,6 +4,7 @@ import threading
|
|||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
import six
|
import six
|
||||||
|
import traceback
|
||||||
from six import string_types
|
from six import string_types
|
||||||
|
|
||||||
# Python3 queue support.
|
# Python3 queue support.
|
||||||
@ -56,8 +57,8 @@ class WorkerThread(threading.Thread):
|
|||||||
self.done_event.set()
|
self.done_event.set()
|
||||||
except Queue.Empty:
|
except Queue.Empty:
|
||||||
pass
|
pass
|
||||||
except:
|
except Exception as e:
|
||||||
logger.debug("Exception occurred")
|
logger.error(type(e).__name__ + " occurred, args=" + str(e.args) + "\n" + traceback.format_exc())
|
||||||
self.exc_info = sys.exc_info()
|
self.exc_info = sys.exc_info()
|
||||||
self.exception_event.set()
|
self.exception_event.set()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user