summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/BasePlugin.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hoster/BasePlugin.py')
-rw-r--r--module/plugins/hoster/BasePlugin.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/module/plugins/hoster/BasePlugin.py b/module/plugins/hoster/BasePlugin.py
index a26a7a180..ba0f1781e 100644
--- a/module/plugins/hoster/BasePlugin.py
+++ b/module/plugins/hoster/BasePlugin.py
@@ -89,14 +89,16 @@ class BasePlugin(Hoster):
'Html error' : re.compile(r'\A(?:\s*<.+>)?((?:[\w\s]*(?:[Ee]rror|ERROR)\s*\:?)?\s*\d{3})(?:\Z|\s+)'),
'Html file' : re.compile(r'\A\s*<!DOCTYPE html'),
'Unknown error': re.compile(r'([Aa]n error occured while processing your request)')})
- if errmsg:
- try:
- errmsg += " | " + self.lastCheck.group(1).strip()
- except Exception:
- pass
+ if not errmsg:
+ return
+
+ 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)
getInfo = create_getInfo(BasePlugin)