summaryrefslogtreecommitdiffstats
path: root/pyload/manager/ThreadManager.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-01 23:53:07 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-01 23:53:07 +0100
commit004a80bfaad38f9400e8aebcb8f980353a232295 (patch)
tree1e786d2d14a3040767aac237982544b74a9567cb /pyload/manager/ThreadManager.py
parentFix previous merge (diff)
downloadpyload-004a80bfaad38f9400e8aebcb8f980353a232295.tar.xz
PEP-8, Python Zen, refactor and reduce code (thx FedeG)
Diffstat (limited to 'pyload/manager/ThreadManager.py')
-rw-r--r--pyload/manager/ThreadManager.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pyload/manager/ThreadManager.py b/pyload/manager/ThreadManager.py
index 1e7bf0f92..c1204c632 100644
--- a/pyload/manager/ThreadManager.py
+++ b/pyload/manager/ThreadManager.py
@@ -33,7 +33,7 @@ from pyload.network.RequestFactory import getURL
from pyload.utils import freeSpace, lock
-class ThreadManager:
+class ThreadManager(object):
"""manages the download threads, assign jobs, reconnect etc"""
@@ -190,7 +190,7 @@ class ThreadManager:
try:
reconn = Popen(self.core.config['reconnect']['method'], bufsize=-1, shell=True)#, stdout=subprocess.PIPE)
- except:
+ except Exception:
self.core.log.warning(_("Failed executing reconnect script!"))
self.core.config["reconnect"]["activated"] = False
self.reconnecting.clear()
@@ -219,7 +219,7 @@ class ThreadManager:
ip = getURL(sv[0])
ip = re.match(sv[1], ip).group(1)
break
- except:
+ except Exception:
ip = ""
sleep(1)