summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/addon/UpdateManager.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-10 19:07:53 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-10 19:07:53 +0100
commit2439bc22671dde697817291b721bfddb792a93b4 (patch)
treedad4615b7f1d664263af6a85392282329aa0b8e0 /pyload/plugins/addon/UpdateManager.py
parentRevert plugin directory structure (diff)
downloadpyload-2439bc22671dde697817291b721bfddb792a93b4.tar.xz
Fix plugins key attributes
Diffstat (limited to 'pyload/plugins/addon/UpdateManager.py')
-rw-r--r--pyload/plugins/addon/UpdateManager.py40
1 files changed, 20 insertions, 20 deletions
diff --git a/pyload/plugins/addon/UpdateManager.py b/pyload/plugins/addon/UpdateManager.py
index b4818c943..18b96256b 100644
--- a/pyload/plugins/addon/UpdateManager.py
+++ b/pyload/plugins/addon/UpdateManager.py
@@ -14,26 +14,26 @@ from pyload.utils import safe_join
class UpdateManager(Addon):
- __name__ = "UpdateManager"
- __type__ = "addon"
- __version__ = "0.42"
+ __name = "UpdateManager"
+ __type = "addon"
+ __version = "0.42"
- __config__ = [("activated" , "bool" , "Activated" , True ),
- ("mode" , "pyLoad + plugins;plugins only", "Check updates for" , "pyLoad + plugins"),
- ("interval" , "int" , "Check interval in hours" , 8 ),
- ("autorestart" , "bool" , "Automatically restart pyLoad when required" , True ),
- ("reloadplugins", "bool" , "Monitor plugins for code changes in debug mode", 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 ),
+ ("autorestart" , "bool" , "Automatically restart pyLoad when required" , True ),
+ ("reloadplugins", "bool" , "Monitor plugins for code changes in debug mode", 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"]
SERVER_URL = "http://updatemanager.pyload.org"
- VERSION = re.compile(r'__version__.*=.*("|\')([\d.]+)')
+ VERSION = re.compile(r'__version.*=.*("|\')([\d.]+)')
MIN_INTERVAL = 3 * 60 * 60 #: 3h minimum check interval (value is in seconds)
@@ -55,13 +55,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):
@@ -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("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")