diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-03-11 14:22:45 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-03-11 14:22:45 +0100 |
commit | 6f36b6314cecb7ff32e4f038751a18b7d4abd3d2 (patch) | |
tree | df92d01840809f1733d179c52d0be4d5901e0137 /module/plugins/internal | |
parent | Merge pull request #1247 from sebdelsol/patch-3 (diff) | |
download | pyload-6f36b6314cecb7ff32e4f038751a18b7d4abd3d2.tar.xz |
[SimpleHoster] Fix https://github.com/pyload/pyload/issues/1248
Diffstat (limited to 'module/plugins/internal')
-rw-r--r-- | module/plugins/internal/SimpleHoster.py | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index 13a9c134f..a1825a73e 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -246,7 +246,7 @@ def secondsToMidnight(gmt=0): class SimpleHoster(Hoster): __name__ = "SimpleHoster" __type__ = "hoster" - __version__ = "1.23" + __version__ = "1.24" __pattern__ = r'^unmatchable$' @@ -524,16 +524,20 @@ class SimpleHoster(Hoster): if r not in rules and hasattr(self, a): rules[r] = getattr(self, a) - errmsg = self.checkDownload(rules).strip().capitalize() + errmsg = self.checkDownload(rules) - if errmsg: - try: - errmsg += " | " + self.lastCheck.group(1).strip() - except Exception: - pass + if not errmsg: + return + + errmsg = errmsg.strip().capitalize() + + try: + errmsg += " | " + self.lastCheck.group(1).strip() + except Exception: + pass - self.logWarning("Bad file", "Waiting 1 minute and retry") - self.retry(3, 60, errmsg) + self.logWarning("Bad file", "Waiting 1 minute and retry") + self.retry(3, 60, errmsg) def checkErrors(self): |