diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-12-25 00:34:16 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-12-25 00:34:16 +0100 |
commit | 06f09fc3e922ee9ffda38403d5baa1d4daaea911 (patch) | |
tree | 343e3f4f765197e94c749220fb9a00be386d93a8 | |
parent | fixed weird issues, comments (diff) | |
download | pyload-06f09fc3e922ee9ffda38403d5baa1d4daaea911.tar.xz |
catch socket exceptions
-rw-r--r-- | module/PluginThread.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/module/PluginThread.py b/module/PluginThread.py index 0e7594d3a..eca00324a 100644 --- a/module/PluginThread.py +++ b/module/PluginThread.py @@ -30,6 +30,7 @@ from types import MethodType from os.path import join, exists from urllib2 import URLError +from socket import error from module.plugins.Plugin import Abort from module.plugins.Plugin import Fail @@ -213,7 +214,7 @@ class DownloadThread(PluginThread): self.clean(pyfile) continue - except URLError, e: + except error, e: #@TODO determine correct error codes try: code, msg = e.args @@ -221,7 +222,7 @@ class DownloadThread(PluginThread): code = 0 msg = e.args - self.m.log.debug("Urllib error %s: %s" % (code, msg)) + self.m.log.debug("socket error %s: %s" % (code, msg)) if code in (7, 18, 28, 52, 56, 104): self.m.log.warning(_("Couldn't connect to host or connection resetted waiting 1 minute and retry.")) @@ -244,7 +245,7 @@ class DownloadThread(PluginThread): else: pyfile.setStatus("failed") - self.m.log.error("Urllib error %s: %s" % (code, msg)) + self.m.log.error("socket error %s: %s" % (code, msg)) if self.m.core.debug: print_exc() self.writeDebugReport(pyfile) |