summaryrefslogtreecommitdiffstats
path: root/pyload
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-10 19:35:46 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-10 19:35:46 +0100
commitc1dd1e9e8cb4de692dd0e2560b60ce0872a18490 (patch)
tree45b1564e5a6acf2cc847f4b38438d907a16a634f /pyload
parentFix bad merge (diff)
downloadpyload-c1dd1e9e8cb4de692dd0e2560b60ce0872a18490.tar.xz
Support new key attributes
Diffstat (limited to 'pyload')
-rw-r--r--pyload/manager/AccountManager.py2
-rw-r--r--pyload/manager/AddonManager.py14
-rw-r--r--pyload/manager/PluginManager.py8
-rw-r--r--pyload/manager/ThreadManager.py2
-rw-r--r--pyload/manager/thread/PluginThread.py2
5 files changed, 14 insertions, 14 deletions
diff --git a/pyload/manager/AccountManager.py b/pyload/manager/AccountManager.py
index cd9d51da1..22345de8d 100644
--- a/pyload/manager/AccountManager.py
+++ b/pyload/manager/AccountManager.py
@@ -176,7 +176,7 @@ class AccountManager(object):
if self.accounts[p]:
p = self.getAccountPlugin(p)
if p:
- data[p.__name__] = p.getAllAccounts(force)
+ data[p.__name] = p.getAllAccounts(force)
else: #@NOTE: When an account has been skipped, p is None
data[p] = []
else:
diff --git a/pyload/manager/AddonManager.py b/pyload/manager/AddonManager.py
index ced0611bc..6ae9f4fbc 100644
--- a/pyload/manager/AddonManager.py
+++ b/pyload/manager/AddonManager.py
@@ -97,16 +97,16 @@ class AddonManager(object):
for pluginname in self.core.pluginManager.addonPlugins:
try:
- # hookClass = getattr(plugin, plugin.__name__)
+ # hookClass = getattr(plugin, plugin.__name)
if self.core.config.getPlugin(pluginname, "activated"):
pluginClass = self.core.pluginManager.loadClass("addon", pluginname)
if not pluginClass: continue
plugin = pluginClass(self.core, self)
plugins.append(plugin)
- self.pluginMap[pluginClass.__name__] = plugin
+ self.pluginMap[pluginClass.__name] = plugin
if plugin.isActivated():
- active.append(pluginClass.__name__)
+ active.append(pluginClass.__name)
else:
deactive.append(pluginname)
@@ -129,7 +129,7 @@ class AddonManager(object):
def activateAddon(self, plugin):
# check if already loaded
for inst in self.plugins:
- if inst.__name__ == plugin:
+ if inst.__name == plugin:
return
pluginClass = self.core.pluginManager.loadClass("addon", plugin)
@@ -141,7 +141,7 @@ class AddonManager(object):
plugin = pluginClass(self.core, self)
self.plugins.append(plugin)
- self.pluginMap[pluginClass.__name__] = plugin
+ self.pluginMap[pluginClass.__name] = plugin
# call core Ready
t = Thread(target=plugin.coreReady)
@@ -152,7 +152,7 @@ class AddonManager(object):
def deactivateAddon(self, plugin):
addon = None
for inst in self.plugins:
- if inst.__name__ == plugin:
+ if inst.__name == plugin:
addon = inst
if not addon:
@@ -165,7 +165,7 @@ class AddonManager(object):
#remove periodic call
self.core.log.debug("Removed callback %s" % self.core.scheduler.removeJob(addon.cb))
self.plugins.remove(addon)
- del self.pluginMap[addon.__name__]
+ del self.pluginMap[addon.__name]
@try_catch
diff --git a/pyload/manager/PluginManager.py b/pyload/manager/PluginManager.py
index aa3668657..339281d43 100644
--- a/pyload/manager/PluginManager.py
+++ b/pyload/manager/PluginManager.py
@@ -19,10 +19,10 @@ class PluginManager(object):
USERROOT = "userplugins."
TYPES = []
- PATTERN = re.compile(r'__pattern__\s*=\s*u?r("|\')([^"\']+)')
- VERSION = re.compile(r'__version__\s*=\s*("|\')([\d.]+)')
- CONFIG = re.compile(r'__config__\s*=\s*\[([^\]]+)', re.M)
- DESC = re.compile(r'__description__\s*=\s*("|"""|\')([^"\']+)')
+ PATTERN = re.compile(r'__pattern\s*=\s*u?r("|\')([^"\']+)')
+ VERSION = re.compile(r'__version\s*=\s*("|\')([\d.]+)')
+ CONFIG = re.compile(r'__config\s*=\s*\[([^\]]+)', re.M)
+ DESC = re.compile(r'__description\s*=\s*("|"""|\')([^"\']+)')
def __init__(self, core):
diff --git a/pyload/manager/ThreadManager.py b/pyload/manager/ThreadManager.py
index b403fbf8d..7e7854b75 100644
--- a/pyload/manager/ThreadManager.py
+++ b/pyload/manager/ThreadManager.py
@@ -264,7 +264,7 @@ class ThreadManager(object):
job.release()
return
- if job.plugin.__type__ == "hoster":
+ if job.plugin.__type == "hoster":
spaceLeft = freeSpace(self.core.config["general"]["download_folder"]) / 1024 / 1024
if spaceLeft < self.core.config["general"]["min_free_space"]:
self.core.log.warning(_("Not enough space left on device"))
diff --git a/pyload/manager/thread/PluginThread.py b/pyload/manager/thread/PluginThread.py
index b27210e31..3cdae122f 100644
--- a/pyload/manager/thread/PluginThread.py
+++ b/pyload/manager/thread/PluginThread.py
@@ -72,7 +72,7 @@ class PluginThread(Thread):
def getDebugDump(self, pyfile):
dump = "pyLoad %s Debug Report of %s %s \n\nTRACEBACK:\n %s \n\nFRAMESTACK:\n" % (
- self.m.core.api.getServerVersion(), pyfile.pluginname, pyfile.plugin.__version__, format_exc())
+ self.m.core.api.getServerVersion(), pyfile.pluginname, pyfile.plugin.__version, format_exc())
tb = exc_info()[2]
stack = []