diff options
Diffstat (limited to 'pyload/plugins/internal/UpdateManager.py')
-rw-r--r-- | pyload/plugins/internal/UpdateManager.py | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/pyload/plugins/internal/UpdateManager.py b/pyload/plugins/internal/UpdateManager.py index ee45cf7a2..87e86f17f 100644 --- a/pyload/plugins/internal/UpdateManager.py +++ b/pyload/plugins/internal/UpdateManager.py @@ -12,19 +12,19 @@ from pyload.utils import safe_join class UpdateManager(Addon): - __name__ = "UpdateManager" - __type__ = "addon" - __version__ = "0.40" + __name = "UpdateManager" + __type = "addon" + __version = "0.40" - __config__ = [("activated" , "bool" , "Activated" , True ), - ("mode" , "pyLoad + plugins;plugins only", "Check updates for" , "pyLoad + plugins"), - ("interval" , "int" , "Check interval in hours" , 8 ), - ("reloadplugins", "bool" , "Monitor plugins for code changes (debug mode only)", True ), - ("nodebugupdate", "bool" , "Don't check for updates in debug mode" , True )] + __config = [("activated" , "bool" , "Activated" , True ), + ("mode" , "pyLoad + plugins;plugins only", "Check updates for" , "pyLoad + plugins"), + ("interval" , "int" , "Check interval in hours" , 8 ), + ("reloadplugins", "bool" , "Monitor plugins for code changes (debug mode only)", True ), + ("nodebugupdate", "bool" , "Don't check for updates in debug mode" , True )] - __description__ = """Check for updates""" - __license__ = "GPLv3" - __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] + __description = """Check for updates""" + __license = "GPLv3" + __authors = [("Walter Purcaro", "vuolter@gmail.com")] # event_list = ["pluginConfigChanged"] @@ -51,13 +51,13 @@ class UpdateManager(Addon): def coreReady(self): - self.pluginConfigChanged(self.__name__, "interval", self.getConfig("interval")) - x = lambda: self.pluginConfigChanged(self.__name__, "reloadplugins", self.getConfig("reloadplugins")) + self.pluginConfigChanged(self.__name, "interval", self.getConfig("interval")) + x = lambda: self.pluginConfigChanged(self.__name, "reloadplugins", self.getConfig("reloadplugins")) self.core.scheduler.addJob(10, x, threaded=False) def unload(self): - self.pluginConfigChanged(self.__name__, "reloadplugins", False) + self.pluginConfigChanged(self.__name, "reloadplugins", False) def setup(self): @@ -79,15 +79,15 @@ class UpdateManager(Addon): def autoreloadPlugins(self): """ reload and reindex all modified plugins """ modules = filter( - lambda m: m and (m.__name__.startswith("pyload.plugins.") or - m.__name__.startswith("userplugins.")) and - m.__name__.count(".") >= 2, sys.modules.itervalues() + lambda m: m and (m.__name.startswith("pyload.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") @@ -173,7 +173,7 @@ class UpdateManager(Addon): exitcode = 0 updated = [] - vre = re.compile(r'__version__.*=.*("|\')([\d.]+)') + vre = re.compile(r'__version.*=.*("|\')([\d.]+)') url = updates[0] schema = updates[1].split('|') |