summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/addon
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/plugins/addon
parentFix previous merge (diff)
downloadpyload-004a80bfaad38f9400e8aebcb8f980353a232295.tar.xz
PEP-8, Python Zen, refactor and reduce code (thx FedeG)
Diffstat (limited to 'pyload/plugins/addon')
-rw-r--r--pyload/plugins/addon/ExternalScripts.py2
-rw-r--r--pyload/plugins/addon/IRCInterface.py8
-rw-r--r--pyload/plugins/addon/UpdateManager.py2
-rw-r--r--pyload/plugins/addon/XMPPInterface.py6
4 files changed, 9 insertions, 9 deletions
diff --git a/pyload/plugins/addon/ExternalScripts.py b/pyload/plugins/addon/ExternalScripts.py
index 5aff0f11f..05aeecff6 100644
--- a/pyload/plugins/addon/ExternalScripts.py
+++ b/pyload/plugins/addon/ExternalScripts.py
@@ -54,7 +54,7 @@ class ExternalScripts(Addon):
if not exists(path):
try:
makedirs(path)
- except:
+ except Exception:
self.logDebug("Script folder %s not created" % folder)
return
diff --git a/pyload/plugins/addon/IRCInterface.py b/pyload/plugins/addon/IRCInterface.py
index a89efcd0c..5b3178852 100644
--- a/pyload/plugins/addon/IRCInterface.py
+++ b/pyload/plugins/addon/IRCInterface.py
@@ -57,7 +57,7 @@ class IRCInterface(Thread, Addon):
try:
if self.getConfig("info_pack"):
self.response(_("Package finished: %s") % pypack.name)
- except:
+ except Exception:
pass
@@ -66,7 +66,7 @@ class IRCInterface(Thread, Addon):
if self.getConfig("info_file"):
self.response(
_("Download finished: %(name)s @ %(plugin)s ") % {"name": pyfile.name, "plugin": pyfile.pluginname})
- except:
+ except Exception:
pass
@@ -179,7 +179,7 @@ class IRCInterface(Thread, Addon):
trigger = temp[0]
if len(temp) > 1:
args = temp[1:]
- except:
+ except Exception:
pass
handler = getattr(self, "event_%s" % trigger, self.event_pass)
@@ -343,7 +343,7 @@ class IRCInterface(Thread, Addon):
return ["INFO: Added %d links to Package %s [#%d]" % (len(links), pack['name'], id)]
- except:
+ except Exception:
# create new package
id = self.core.api.addPackage(pack, links, 1)
return ["INFO: Created new Package %s [#%d] with %d links." % (pack, id, len(links))]
diff --git a/pyload/plugins/addon/UpdateManager.py b/pyload/plugins/addon/UpdateManager.py
index 082721e2f..622374136 100644
--- a/pyload/plugins/addon/UpdateManager.py
+++ b/pyload/plugins/addon/UpdateManager.py
@@ -115,7 +115,7 @@ class UpdateManager(Addon):
def server_request(self):
try:
return getURL(self.SERVER_URL, get={'v': self.core.api.getServerVersion()}).splitlines()
- except:
+ except Exception:
self.logWarning(_("Unable to contact server to get updates"))
diff --git a/pyload/plugins/addon/XMPPInterface.py b/pyload/plugins/addon/XMPPInterface.py
index 7b11bd4dd..5bbff8915 100644
--- a/pyload/plugins/addon/XMPPInterface.py
+++ b/pyload/plugins/addon/XMPPInterface.py
@@ -70,7 +70,7 @@ class XMPPInterface(IRCInterface, JabberClient):
try:
if self.getConfig("info_pack"):
self.announce(_("Package finished: %s") % pypack.name)
- except:
+ except Exception:
pass
@@ -79,7 +79,7 @@ class XMPPInterface(IRCInterface, JabberClient):
if self.getConfig("info_file"):
self.announce(
_("Download finished: %(name)s @ %(plugin)s") % {"name": pyfile.name, "plugin": pyfile.pluginname})
- except:
+ except Exception:
pass
@@ -153,7 +153,7 @@ class XMPPInterface(IRCInterface, JabberClient):
trigger = temp[0]
if len(temp) > 1:
args = temp[1:]
- except:
+ except Exception:
pass
handler = getattr(self, "event_%s" % trigger, self.event_pass)