summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-07-14 16:10:01 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-07-15 16:26:07 +0200
commit7b8c458cca7d21a029620f98e453f746fce69cd1 (patch)
tree9e97b0003a00ff8ac9ee6b777d94bb998c911d05 /module/plugins/internal
parentFix code indentation, some bad whitespaces and missing authors + use 'not' in... (diff)
downloadpyload-7b8c458cca7d21a029620f98e453f746fce69cd1.tar.xz
Prefer single quote for dict key name
Diffstat (limited to 'module/plugins/internal')
-rw-r--r--module/plugins/internal/MultiHoster.py18
-rw-r--r--module/plugins/internal/SimpleHoster.py2
-rw-r--r--module/plugins/internal/UnRar.py4
3 files changed, 12 insertions, 12 deletions
diff --git a/module/plugins/internal/MultiHoster.py b/module/plugins/internal/MultiHoster.py
index 0dea76109..46d943bd7 100644
--- a/module/plugins/internal/MultiHoster.py
+++ b/module/plugins/internal/MultiHoster.py
@@ -141,8 +141,8 @@ class MultiHoster(Hook):
self.logDebug("Overwritten Hosters: %s" % ", ".join(sorted(self.supported)))
for hoster in self.supported:
dict = self.core.pluginManager.hosterPlugins[hoster]
- dict["new_module"] = module
- dict["new_name"] = self.__name__
+ dict['new_module'] = module
+ dict['new_name'] = self.__name__
if excludedList:
self.logInfo("The following hosters were not overwritten - account exists: %s" % ", ".join(sorted(excludedList)))
@@ -158,17 +158,17 @@ class MultiHoster(Hook):
self.logDebug("Regexp: %s" % regexp)
dict = self.core.pluginManager.hosterPlugins[self.__name__]
- dict["pattern"] = regexp
- dict["re"] = re.compile(regexp)
+ dict['pattern'] = regexp
+ dict['re'] = re.compile(regexp)
def unloadHoster(self, hoster):
dict = self.core.pluginManager.hosterPlugins[hoster]
if "module" in dict:
- del dict["module"]
+ del dict['module']
if "new_module" in dict:
- del dict["new_module"]
- del dict["new_name"]
+ del dict['new_module']
+ del dict['new_name']
def unload(self):
"""Remove override for all hosters. Scheduler job is removed by hookmanager"""
@@ -178,8 +178,8 @@ class MultiHoster(Hook):
# reset pattern
klass = getattr(self.core.pluginManager.getPlugin(self.__name__), self.__name__)
dict = self.core.pluginManager.hosterPlugins[self.__name__]
- dict["pattern"] = getattr(klass, '__pattern__', r"^unmatchable$")
- dict["re"] = re.compile(dict["pattern"])
+ dict['pattern'] = getattr(klass, "__pattern__", r'^unmatchable$')
+ dict['re'] = re.compile(dict['pattern'])
def downloadFailed(self, pyfile):
"""remove plugin override if download fails but not if file is offline/temp.offline"""
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py
index ba143f4d8..0dfecf0fb 100644
--- a/module/plugins/internal/SimpleHoster.py
+++ b/module/plugins/internal/SimpleHoster.py
@@ -291,7 +291,7 @@ class SimpleHoster(Hoster):
return parseHtmlForm(attr_str, self.html, input_names)
def checkTrafficLeft(self):
- traffic = self.account.getAccountInfo(self.user, True)["trafficleft"]
+ traffic = self.account.getAccountInfo(self.user, True)['trafficleft']
if traffic == -1:
return True
size = self.pyfile.size / 1024
diff --git a/module/plugins/internal/UnRar.py b/module/plugins/internal/UnRar.py
index 28f801f3e..0251620ab 100644
--- a/module/plugins/internal/UnRar.py
+++ b/module/plugins/internal/UnRar.py
@@ -203,8 +203,8 @@ class UnRar(AbtractExtractor):
args.append("-y")
# set a password
- if "password" in kwargs and kwargs["password"]:
- args.append("-p%s" % kwargs["password"])
+ if "password" in kwargs and kwargs['password']:
+ args.append("-p%s" % kwargs['password'])
else:
args.append("-p-")