From e7f4ce80f3140e10b81b3dba3aa862e95711c9b7 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sun, 26 Dec 2010 13:50:05 +0100 Subject: more xmpp debug --- module/PluginThread.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'module/PluginThread.py') 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) -- cgit v1.2.3