summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-04 01:09:43 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-04 01:09:43 +0100
commit2f4d7d614171054c3c2b0b6185fa4ea465f5312f (patch)
tree7614a301498ef19c901b5930ebf26ea287b33120 /module/plugins/internal
parent[OneFichierCom] Fixed (diff)
downloadpyload-2f4d7d614171054c3c2b0b6185fa4ea465f5312f.tar.xz
Use more print_exc + code cosmetics
Diffstat (limited to 'module/plugins/internal')
-rw-r--r--module/plugins/internal/SimpleHoster.py4
-rw-r--r--module/plugins/internal/XFSHoster.py2
2 files changed, 2 insertions, 4 deletions
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py
index 1f673a5c2..ac90e193a 100644
--- a/module/plugins/internal/SimpleHoster.py
+++ b/module/plugins/internal/SimpleHoster.py
@@ -24,8 +24,6 @@ def _error(self, reason, type):
msg += ": " + reason.strip() if reason else ""
msg += _(" | Plugin may be out of date")
- if self.core.debug:
- print_exc()
raise Fail(msg)
@@ -315,7 +313,7 @@ class SimpleHoster(Hoster):
self.req.http.c.setopt(FOLLOWLOCATION, 1)
- if parseFileInfo(self, url, html)[2] != 2:
+ if parseFileInfo(self, url, html)[2] is not 2:
try:
return re.search(r"Location\s*:\s*(.+)", self.req.http.header, re.I).group(1)
except:
diff --git a/module/plugins/internal/XFSHoster.py b/module/plugins/internal/XFSHoster.py
index a2e4f5846..147c4dfde 100644
--- a/module/plugins/internal/XFSHoster.py
+++ b/module/plugins/internal/XFSHoster.py
@@ -102,7 +102,7 @@ class XFSHoster(SimpleHoster):
def getDownloadLink(self):
- for i in xrange(5):
+ for i in xrange(1, 5):
self.logDebug("Getting download link: #%d" % i)
data = self.getPostParameters()