From 004a80bfaad38f9400e8aebcb8f980353a232295 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 1 Dec 2014 23:53:07 +0100 Subject: PEP-8, Python Zen, refactor and reduce code (thx FedeG) --- pyload/plugins/addon/IRCInterface.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pyload/plugins/addon/IRCInterface.py') 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))] -- cgit v1.2.3