summaryrefslogtreecommitdiffstats
path: root/module/PluginThread.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-12-26 13:50:05 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-12-26 13:50:05 +0100
commite7f4ce80f3140e10b81b3dba3aa862e95711c9b7 (patch)
treeec36a7344976a06835cd000910b8f5bb4caaadd9 /module/PluginThread.py
parentbackward comp. fixes (diff)
downloadpyload-e7f4ce80f3140e10b81b3dba3aa862e95711c9b7.tar.xz
more xmpp debug
Diffstat (limited to 'module/PluginThread.py')
-rw-r--r--module/PluginThread.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/module/PluginThread.py b/module/PluginThread.py
index 20bef84df..3f24db345 100644
--- a/module/PluginThread.py
+++ b/module/PluginThread.py
@@ -216,16 +216,19 @@ class DownloadThread(PluginThread):
except error, e:
#@TODO determine correct error codes
- try:
- code, msg = e.args
- except:
- code = 0
+ if len(e.args) > 1:
+ code = e.args[0]
+ msg = e.args[1:]
+ else:
+ code = -1
msg = e.args
+ if "timed out" in msg:
+ code = 990
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."))
+ if code in (104, 990):
+ self.m.log.warning(_("Couldn't connect to host or connection resetted, waiting 1 minute and retry."))
wait = time() + 60
while time() < wait:
sleep(1)