summaryrefslogtreecommitdiffstats
path: root/module/plugins
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-03-18 23:14:24 +0100
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-03-18 23:14:24 +0100
commitb4a43ec54dbd327d46692c7425695adc91fff3d7 (patch)
tree0b6710e743f63d960a285fd20d8f75c9c4ee0bc1 /module/plugins
parentHooks cleanup (diff)
downloadpyload-b4a43ec54dbd327d46692c7425695adc91fff3d7.tar.xz
[SimpleHoster] Fix https://github.com/pyload/pyload/issues/1263
Diffstat (limited to 'module/plugins')
-rw-r--r--module/plugins/internal/MultiHook.py2
-rw-r--r--module/plugins/internal/SimpleHoster.py11
2 files changed, 11 insertions, 2 deletions
diff --git a/module/plugins/internal/MultiHook.py b/module/plugins/internal/MultiHook.py
index 9ba1fc2c8..ef7f47ed1 100644
--- a/module/plugins/internal/MultiHook.py
+++ b/module/plugins/internal/MultiHook.py
@@ -110,7 +110,7 @@ class MultiHook(Hook):
return rep
- def getConfig(self, option, default=''):
+ def getConfig(self, option, default=''): #@TODO: Remove in 0.4.10
"""getConfig with default value - sublass may not implements all config options"""
try:
return self.getConf(option)
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py
index 54872a088..1b6b330b6 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.26"
+ __version__ = "1.27"
__pattern__ = r'^unmatchable$'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -732,6 +732,15 @@ class SimpleHoster(Hoster):
return size <= traffic
+ def getConfig(self, option, default=''): #@TODO: Remove in 0.4.10
+ """getConfig with default value - sublass may not implements all config options"""
+ try:
+ return self.getConf(option)
+
+ except KeyError:
+ return default
+
+
def retryFree(self):
self.account = None
self.req = self.core.requestFactory.getRequest(self.__name__)