From ae55e11c1f0f5b1e9378b06cccc78f0e7bae5b97 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sun, 13 Nov 2011 17:05:28 +0100 Subject: rehost,to timeout fix --- module/plugins/hooks/UpdateManager.py | 6 +++--- module/plugins/hoster/RehostTo.py | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'module/plugins') diff --git a/module/plugins/hooks/UpdateManager.py b/module/plugins/hooks/UpdateManager.py index 705ed8eca..2a85e505f 100644 --- a/module/plugins/hooks/UpdateManager.py +++ b/module/plugins/hooks/UpdateManager.py @@ -121,13 +121,13 @@ class UpdateManager(Hook): try: content = getURL("http://get.pyload.org/plugins/get/" + path) - except: - self.logWarning(_("Error when updating %s") % name) + except Exception, e: + self.logWarning(_("Error when updating %s") % name, str(e)) continue m = vre.search(content) if not m or m.group(2) != version: - self.logWarning(_("Error when updating %s") % name) + self.logWarning(_("Error when updating %s") % name, _("Version mismatch")) continue f = open(join("userplugins", prefix, name), "wb") diff --git a/module/plugins/hoster/RehostTo.py b/module/plugins/hoster/RehostTo.py index 2531d7dbe..370adf077 100644 --- a/module/plugins/hoster/RehostTo.py +++ b/module/plugins/hoster/RehostTo.py @@ -32,5 +32,7 @@ class RehostTo(Hoster): self.log.debug("Rehost.to: Old URL: %s" % pyfile.url) new_url = "http://rehost.to/process_download.php?user=cookie&pass=%s&dl=%s" % (long_ses, quote(pyfile.url, "")) + #raise timeout to 2min + self.req.setOption("timeout", 120) self.download(new_url, disposition=True) \ No newline at end of file -- cgit v1.2.3