diff options
Diffstat (limited to 'module/plugins/hooks')
| -rw-r--r-- | module/plugins/hooks/ExternalScripts.py | 2 | ||||
| -rw-r--r-- | module/plugins/hooks/IRCInterface.py | 8 | ||||
| -rw-r--r-- | module/plugins/hooks/ImageTyperz.py | 2 | ||||
| -rw-r--r-- | module/plugins/hooks/UpdateManager.py | 4 | ||||
| -rw-r--r-- | module/plugins/hooks/XMPPInterface.py | 6 | 
5 files changed, 11 insertions, 11 deletions
| diff --git a/module/plugins/hooks/ExternalScripts.py b/module/plugins/hooks/ExternalScripts.py index fc0cae44f..f4d2cb69c 100644 --- a/module/plugins/hooks/ExternalScripts.py +++ b/module/plugins/hooks/ExternalScripts.py @@ -59,7 +59,7 @@ class ExternalScripts(Hook):          if not exists(path):              try:                  makedirs(path) -            except: +            except Exception:                  self.logDebug("Script folder %s not created" % folder)                  return diff --git a/module/plugins/hooks/IRCInterface.py b/module/plugins/hooks/IRCInterface.py index efd4e411d..98fa1d030 100644 --- a/module/plugins/hooks/IRCInterface.py +++ b/module/plugins/hooks/IRCInterface.py @@ -61,7 +61,7 @@ class IRCInterface(Thread, Hook):          try:              if self.getConfig("info_pack"):                  self.response(_("Package finished: %s") % pypack.name) -        except: +        except Exception:              pass @@ -70,7 +70,7 @@ class IRCInterface(Thread, Hook):              if self.getConfig("info_file"):                  self.response(                      _("Download finished: %(name)s @ %(plugin)s ") % {"name": pyfile.name, "plugin": pyfile.pluginname}) -        except: +        except Exception:              pass @@ -183,7 +183,7 @@ class IRCInterface(Thread, Hook):              trigger = temp[0]              if len(temp) > 1:                  args = temp[1:] -        except: +        except Exception:              pass          handler = getattr(self, "event_%s" % trigger, self.event_pass) @@ -347,7 +347,7 @@ class IRCInterface(Thread, Hook):              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/module/plugins/hooks/ImageTyperz.py b/module/plugins/hooks/ImageTyperz.py index d448d1be9..768129e4a 100644 --- a/module/plugins/hooks/ImageTyperz.py +++ b/module/plugins/hooks/ImageTyperz.py @@ -69,7 +69,7 @@ class ImageTyperz(Hook):          try:              balance = float(res) -        except: +        except Exception:              raise ImageTyperzException("Invalid response")          self.logInfo(_("Account balance: $%s left") % res) diff --git a/module/plugins/hooks/UpdateManager.py b/module/plugins/hooks/UpdateManager.py index c72699228..03b9ba6a4 100644 --- a/module/plugins/hooks/UpdateManager.py +++ b/module/plugins/hooks/UpdateManager.py @@ -117,7 +117,7 @@ class UpdateManager(Hook):      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")) @@ -192,7 +192,7 @@ class UpdateManager(Hook):              # Protect UpdateManager from self-removing              try:                  blacklisted.remove(("hook", "UpdateManager")) -            except: +            except Exception:                  pass              for t, n in blacklisted: diff --git a/module/plugins/hooks/XMPPInterface.py b/module/plugins/hooks/XMPPInterface.py index bbeab4341..b8e9fc1ad 100644 --- a/module/plugins/hooks/XMPPInterface.py +++ b/module/plugins/hooks/XMPPInterface.py @@ -69,7 +69,7 @@ class XMPPInterface(IRCInterface, JabberClient):          try:              if self.getConfig("info_pack"):                  self.announce(_("Package finished: %s") % pypack.name) -        except: +        except Exception:              pass @@ -78,7 +78,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 @@ -152,7 +152,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) | 
