diff options
Diffstat (limited to 'module/plugins/hooks')
-rw-r--r-- | module/plugins/hooks/CaptchaBrotherhood.py | 2 | ||||
-rw-r--r-- | module/plugins/hooks/ExtractArchive.py | 1 | ||||
-rw-r--r-- | module/plugins/hooks/IRCInterface.py | 4 | ||||
-rw-r--r-- | module/plugins/hooks/ImageTyperz.py | 1 | ||||
-rw-r--r-- | module/plugins/hooks/SkipRev.py | 1 | ||||
-rw-r--r-- | module/plugins/hooks/XMPPInterface.py | 5 |
6 files changed, 13 insertions, 1 deletions
diff --git a/module/plugins/hooks/CaptchaBrotherhood.py b/module/plugins/hooks/CaptchaBrotherhood.py index 0df1ab8a9..838c220f0 100644 --- a/module/plugins/hooks/CaptchaBrotherhood.py +++ b/module/plugins/hooks/CaptchaBrotherhood.py @@ -79,6 +79,7 @@ class CaptchaBrotherhood(Hook): img.save(output, "JPEG") data = output.getvalue() output.close() + except Exception, e: raise CaptchaBrotherhoodException("Reading or converting captcha image failed: %s" % e) @@ -98,6 +99,7 @@ class CaptchaBrotherhood(Hook): try: req.c.perform() res = req.getResponse() + except Exception, e: raise CaptchaBrotherhoodException("Submit captcha image failed") diff --git a/module/plugins/hooks/ExtractArchive.py b/module/plugins/hooks/ExtractArchive.py index 469f73141..7d3d9237e 100644 --- a/module/plugins/hooks/ExtractArchive.py +++ b/module/plugins/hooks/ExtractArchive.py @@ -66,6 +66,7 @@ class ArchiveQueue(object): def get(self): try: return [int(pid) for pid in self.plugin.retrieve("ExtractArchive:%s" % self.storage, "").decode('base64').split()] + except Exception: return [] diff --git a/module/plugins/hooks/IRCInterface.py b/module/plugins/hooks/IRCInterface.py index 5d8928a57..020939805 100644 --- a/module/plugins/hooks/IRCInterface.py +++ b/module/plugins/hooks/IRCInterface.py @@ -55,6 +55,7 @@ class IRCInterface(Thread, Addon): try: if self.get_config('info_pack'): self.response(_("Package finished: %s") % pypack.name) + except Exception: pass @@ -64,6 +65,7 @@ class IRCInterface(Thread, Addon): if self.get_config('info_file'): self.response( _("Download finished: %(name)s @ %(plugin)s ") % {'name': pyfile.name, 'plugin': pyfile.pluginname}) + except Exception: pass @@ -177,6 +179,7 @@ class IRCInterface(Thread, Addon): trigger = temp[0] if len(temp) > 1: args = temp[1:] + except Exception: pass @@ -185,6 +188,7 @@ class IRCInterface(Thread, Addon): res = handler(args) for line in res: self.response(line, msg['origin']) + except Exception, e: self.log_error(e) diff --git a/module/plugins/hooks/ImageTyperz.py b/module/plugins/hooks/ImageTyperz.py index 42ab99027..85c22f1da 100644 --- a/module/plugins/hooks/ImageTyperz.py +++ b/module/plugins/hooks/ImageTyperz.py @@ -61,6 +61,7 @@ class ImageTyperz(Hook): try: balance = float(res) + except Exception: raise ImageTyperzException("Invalid response") diff --git a/module/plugins/hooks/SkipRev.py b/module/plugins/hooks/SkipRev.py index 9f54218d6..5f9cfa452 100644 --- a/module/plugins/hooks/SkipRev.py +++ b/module/plugins/hooks/SkipRev.py @@ -2,7 +2,6 @@ import re import urllib -import urlparse from types import MethodType diff --git a/module/plugins/hooks/XMPPInterface.py b/module/plugins/hooks/XMPPInterface.py index 50dd40774..77e20cdd4 100644 --- a/module/plugins/hooks/XMPPInterface.py +++ b/module/plugins/hooks/XMPPInterface.py @@ -70,6 +70,7 @@ class XMPPInterface(IRCInterface, JabberClient): try: if self.get_config('info_pack'): self.announce(_("Package finished: %s") % pypack.name) + except Exception: pass @@ -79,6 +80,7 @@ class XMPPInterface(IRCInterface, JabberClient): if self.get_config('info_file'): self.announce( _("Download finished: %(name)s @ %(plugin)s") % {'name': pyfile.name, 'plugin': pyfile.pluginname}) + except Exception: pass @@ -88,6 +90,7 @@ class XMPPInterface(IRCInterface, JabberClient): self.connect() try: self.loop() + except Exception, ex: self.log_error(ex) @@ -159,6 +162,7 @@ class XMPPInterface(IRCInterface, JabberClient): trigger = temp[0] if len(temp) > 1: args = temp[1:] + except Exception: pass @@ -174,6 +178,7 @@ class XMPPInterface(IRCInterface, JabberClient): body=line) messages.append(m) + except Exception, e: self.log_error(e) |