diff options
author | Armin <Armin@Armin-PC.diedering.lan> | 2015-04-09 20:11:11 +0200 |
---|---|---|
committer | Armin <Armin@Armin-PC.diedering.lan> | 2015-04-09 20:11:11 +0200 |
commit | f53d57b902b71708f05a3125872ec5d34ebe65b9 (patch) | |
tree | 2f8756396411a98331cb937e42ded87da2c9f253 /pyload/plugin/addon | |
parent | Merge remote-tracking branch 'origin/0.4.10' into 0.4.10 (diff) | |
download | pyload-f53d57b902b71708f05a3125872ec5d34ebe65b9.tar.xz |
fix: OboomCom and SmoozedCom with beaker >= v1.7.x
fix: run plugins this fix makes the plugin attribute "__name" obsolet
Diffstat (limited to 'pyload/plugin/addon')
-rw-r--r-- | pyload/plugin/addon/DeleteFinished.py | 2 | ||||
-rw-r--r-- | pyload/plugin/addon/ExtractArchive.py | 4 | ||||
-rw-r--r-- | pyload/plugin/addon/MergeFiles.py | 2 | ||||
-rw-r--r-- | pyload/plugin/addon/RestartFailed.py | 2 | ||||
-rw-r--r-- | pyload/plugin/addon/UpdateManager.py | 8 |
5 files changed, 9 insertions, 9 deletions
diff --git a/pyload/plugin/addon/DeleteFinished.py b/pyload/plugin/addon/DeleteFinished.py index 2349503f6..7e47a8728 100644 --- a/pyload/plugin/addon/DeleteFinished.py +++ b/pyload/plugin/addon/DeleteFinished.py @@ -52,7 +52,7 @@ class DeleteFinished(Addon): def activate(self): self.info['sleep'] = True # interval = self.getConfig('interval') - # self.pluginConfigChanged(self.__name, 'interval', interval) + # self.pluginConfigChanged(self.__class__.__name__, 'interval', interval) self.interval = max(self.MIN_CHECK_INTERVAL, self.getConfig('interval') * 60 * 60) self.addEvent('packageFinished', self.wakeup) self.initPeriodical() diff --git a/pyload/plugin/addon/ExtractArchive.py b/pyload/plugin/addon/ExtractArchive.py index 369be11bb..c5b3b6993 100644 --- a/pyload/plugin/addon/ExtractArchive.py +++ b/pyload/plugin/addon/ExtractArchive.py @@ -173,7 +173,7 @@ class ExtractArchive(Addon): print_exc() if self.extractors: - self.logInfo(_("Activated") + " " + "|".join("%s %s" % (Extractor.__name,Extractor.VERSION) for Extractor in self.extractors)) + self.logInfo(_("Activated") + " " + "|".join("%s %s" % (Extractor.__name__,Extractor.VERSION) for Extractor in self.extractors)) self.extractQueued() #: Resume unfinished extractions else: self.logInfo(_("No Extract plugins activated")) @@ -288,7 +288,7 @@ class ExtractArchive(Addon): for Extractor in self.extractors: targets = Extractor.getTargets(files_ids) if targets: - self.logDebug("Targets for %s: %s" % (Extractor.__name, targets)) + self.logDebug("Targets for %s: %s" % (Extractor.__class__.__name__, targets)) matched = True for fname, fid, fout in targets: diff --git a/pyload/plugin/addon/MergeFiles.py b/pyload/plugin/addon/MergeFiles.py index 87775bea2..a0298052b 100644 --- a/pyload/plugin/addon/MergeFiles.py +++ b/pyload/plugin/addon/MergeFiles.py @@ -46,7 +46,7 @@ class MergeFiles(Addon): for name, file_list in files.iteritems(): self.logInfo(_("Starting merging of"), name) - final_file = open(fs_join(download_folder, name), "wb") + with open(fs_join(download_folder, name), "wb") as final_file: for splitted_file in file_list: self.logDebug("Merging part", splitted_file) diff --git a/pyload/plugin/addon/RestartFailed.py b/pyload/plugin/addon/RestartFailed.py index eaa86ebcb..695ebb154 100644 --- a/pyload/plugin/addon/RestartFailed.py +++ b/pyload/plugin/addon/RestartFailed.py @@ -38,6 +38,6 @@ class RestartFailed(Addon): def activate(self): - # self.pluginConfigChanged(self.__name, "interval", self.getConfig('interval')) + # self.pluginConfigChanged(self.__class__.__name__, "interval", self.getConfig('interval')) self.interval = max(self.MIN_CHECK_INTERVAL, self.getConfig('interval') * 60) self.initPeriodical() diff --git a/pyload/plugin/addon/UpdateManager.py b/pyload/plugin/addon/UpdateManager.py index a2b26b618..41a1d7f2c 100644 --- a/pyload/plugin/addon/UpdateManager.py +++ b/pyload/plugin/addon/UpdateManager.py @@ -83,15 +83,15 @@ class UpdateManager(Addon): def autoreloadPlugins(self): """ reload and reindex all modified plugins """ modules = filter( - lambda m: m and (m.__name.startswith("module.plugins.") or - m.__name.startswith("userplugins.")) and - m.__name.count(".") >= 2, sys.modules.itervalues() + lambda m: m and (m.__name__.startswith("module.plugins.") or + m.__name__.startswith("userplugins.")) and + m.__name__.count(".") >= 2, sys.modules.itervalues() ) reloads = [] for m in modules: - root, type, name = m.__name.rsplit(".", 2) + root, type, name = m.__name__.rsplit(".", 2) id = (type, name) if type in self.core.pluginManager.plugins: f = m.__file__.replace(".pyc", ".py") |