Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mrDoctorWho/vk4xmpp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Smith <mrdoctorwho@helldev.net>2018-11-04 06:50:10 +0300
committerJohn Smith <mrdoctorwho@helldev.net>2018-11-04 06:50:10 +0300
commit9fc524a3f4c157c5252a30106b451c4fabf46251 (patch)
treed3d7ff9b1bbd1725998635b5b4d4e9cff7a661dd /library
parent3179db1cf281fef07246a4d8675118f2b6cfdf31 (diff)
remove redundant runThread() call retry
Diffstat (limited to 'library')
-rw-r--r--library/utils.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/library/utils.py b/library/utils.py
index 676376a..ccef7c3 100644
--- a/library/utils.py
+++ b/library/utils.py
@@ -32,7 +32,7 @@ def execute(handler, list=(), log=True):
return result
-def runThread(func, args=(), name=None, att=3, delay=0):
+def runThread(func, args=(), name=None, delay=0):
"""
Runs a thread with custom args and name
Needed to reduce code
@@ -53,12 +53,7 @@ def runThread(func, args=(), name=None, att=3, delay=0):
name = name or func.__name__
name = str(name) + "-" + str(time.time())
thr.name = name
- try:
- thr.start()
- except (threading.ThreadError):
- if att:
- return runThread(func, args, name, (att - 1), delay)
- crashLog("runThread.%s" % name)
+ thr.start()
return thr