summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-28 16:03:14 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-28 16:03:14 +0100
commit8447df36b147bab1c3caa70aaa67732115ad735b (patch)
treef77eae6d8181f57f85c6439212aa8912c5648bf2 /module
parent[SimpleCrypter] Wait method (diff)
downloadpyload-8447df36b147bab1c3caa70aaa67732115ad735b.tar.xz
[SimpleHoster] Improve wait method
Diffstat (limited to 'module')
-rw-r--r--module/plugins/internal/SimpleHoster.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py
index 9e270ff3d..c47a715f0 100644
--- a/module/plugins/internal/SimpleHoster.py
+++ b/module/plugins/internal/SimpleHoster.py
@@ -14,7 +14,7 @@ from module.utils import fixup, html_unescape, parseFileSize
#@TODO: Remove in 0.4.10 and redirect to self.error instead
-def _error(self, reason="", type=""):
+def _error(self, reason, type):
if not reason and not type:
type = "unknown"
@@ -27,6 +27,13 @@ def _error(self, reason="", type=""):
raise Fail(msg)
+#@TODO: Remove in 0.4.10
+def _wait(self, seconds, reconnect):
+ if seconds:
+ self.setWait(seconds, reconnect)
+ super(SimpleHoster, self).wait()
+
+
def replace_patterns(string, ruleslist):
for r in ruleslist:
rf, rt = r
@@ -159,7 +166,7 @@ def timestamp():
class SimpleHoster(Hoster):
__name__ = "SimpleHoster"
__type__ = "hoster"
- __version__ = "0.43"
+ __version__ = "0.44"
__pattern__ = None
@@ -341,10 +348,8 @@ class SimpleHoster(Hoster):
#@TODO: Remove in 0.4.10
- def wait(self, seconds=False, reconnect=False):
- if seconds:
- self.setWait(seconds, reconnect)
- super(SimpleHoster, self).wait()
+ def wait(self, seconds=0, reconnect=None):
+ return _wait(self, seconds, reconnect)
def error(self, reason="", type="parse"):