summaryrefslogtreecommitdiffstats
path: root/pyload/manager/thread
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/thread
parentFix previous merge (diff)
downloadpyload-004a80bfaad38f9400e8aebcb8f980353a232295.tar.xz
PEP-8, Python Zen, refactor and reduce code (thx FedeG)
Diffstat (limited to 'pyload/manager/thread')
-rw-r--r--pyload/manager/thread/DownloadThread.py2
-rw-r--r--pyload/manager/thread/InfoThread.py6
-rw-r--r--pyload/manager/thread/PluginThread.py2
-rw-r--r--pyload/manager/thread/ServerThread.py2
4 files changed, 6 insertions, 6 deletions
diff --git a/pyload/manager/thread/DownloadThread.py b/pyload/manager/thread/DownloadThread.py
index 86e18973e..5ecdd9953 100644
--- a/pyload/manager/thread/DownloadThread.py
+++ b/pyload/manager/thread/DownloadThread.py
@@ -93,7 +93,7 @@ class DownloadThread(PluginThread):
except Abort:
try:
self.m.log.info(_("Download aborted: %s") % pyfile.name)
- except:
+ except Exception:
pass
pyfile.setStatus("aborted")
diff --git a/pyload/manager/thread/InfoThread.py b/pyload/manager/thread/InfoThread.py
index 4edc55545..807910cd2 100644
--- a/pyload/manager/thread/InfoThread.py
+++ b/pyload/manager/thread/InfoThread.py
@@ -64,7 +64,7 @@ class InfoThread(PluginThread):
for url, plugintype, pluginname in data:
try:
plugins[plugintype][pluginname].append(url)
- except:
+ except Exception:
plugins[plugintype][pluginname] = [url]
# filter out container plugins
@@ -111,7 +111,7 @@ class InfoThread(PluginThread):
#attach container content
try:
data = self.decryptContainer(name, url)
- except:
+ except Exception:
print_exc()
self.m.log.error("Could not decrypt container.")
data = []
@@ -119,7 +119,7 @@ class InfoThread(PluginThread):
for url, plugintype, pluginname in data:
try:
plugins[plugintype][pluginname].append(url)
- except:
+ except Exception:
plugins[plugintype][pluginname] = [url]
self.m.infoResults[self.rid] = {}
diff --git a/pyload/manager/thread/PluginThread.py b/pyload/manager/thread/PluginThread.py
index faa1bba59..f3a49d621 100644
--- a/pyload/manager/thread/PluginThread.py
+++ b/pyload/manager/thread/PluginThread.py
@@ -64,7 +64,7 @@ class PluginThread(Thread):
try:
# avoid encoding errors
zip.write(join("tmp", pyfile.pluginname, f), safe_join(pyfile.pluginname, f))
- except:
+ except Exception:
pass
info = zipfile.ZipInfo(safe_join(pyfile.pluginname, "debug_Report.txt"), gmtime())
diff --git a/pyload/manager/thread/ServerThread.py b/pyload/manager/thread/ServerThread.py
index 7de3b1ca1..0f3ed01ff 100644
--- a/pyload/manager/thread/ServerThread.py
+++ b/pyload/manager/thread/ServerThread.py
@@ -44,7 +44,7 @@ class WebServer(threading.Thread):
elif self.server == "fastcgi":
try:
import flup
- except:
+ except Exception:
log.warning(_("Can't use %(server)s, python-flup is not installed!") % {
"server": self.server})
reset = True