summaryrefslogtreecommitdiffstats
path: root/pyload/manager
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/manager')
-rw-r--r--pyload/manager/Addon.py2
-rw-r--r--pyload/manager/Captcha.py10
-rw-r--r--pyload/manager/Plugin.py8
-rw-r--r--pyload/manager/Thread.py2
-rw-r--r--pyload/manager/thread/Download.py2
-rw-r--r--pyload/manager/thread/Info.py14
-rw-r--r--pyload/manager/thread/Plugin.py2
7 files changed, 20 insertions, 20 deletions
diff --git a/pyload/manager/Addon.py b/pyload/manager/Addon.py
index a46b99b2e..2a3bc4318 100644
--- a/pyload/manager/Addon.py
+++ b/pyload/manager/Addon.py
@@ -89,7 +89,7 @@ class AddonManager(object):
def callRPC(self, plugin, func, args, parse):
if not args:
- args = tuple()
+ args = ()
if parse:
args = tuple([literal_eval(x) for x in args])
plugin = self.pluginMap[plugin]
diff --git a/pyload/manager/Captcha.py b/pyload/manager/Captcha.py
index 4a7582d65..ab9f79b37 100644
--- a/pyload/manager/Captcha.py
+++ b/pyload/manager/Captcha.py
@@ -13,8 +13,8 @@ class CaptchaManager(object):
def __init__(self, core):
self.lock = Lock()
self.core = core
- self.tasks = [] # task store, for outgoing tasks only
- self.ids = 0 # only for internal purpose
+ self.tasks = [] #: task store, for outgoing tasks only
+ self.ids = 0 #: only for internal purpose
def newTask(self, img, format, file, result_type):
@@ -43,7 +43,7 @@ class CaptchaManager(object):
def getTaskByID(self, tid):
self.lock.acquire()
for task in self.tasks:
- if task.id == str(tid): # task ids are strings
+ if task.id == str(tid): #: task ids are strings
self.lock.release()
return task
self.lock.release()
@@ -81,9 +81,9 @@ class CaptchaTask(object):
self.handler = [] #: the hook plugins that will take care of the solution
self.result = None
self.waitUntil = None
- self.error = None # error message
+ self.error = None #: error message
self.status = "init"
- self.data = {} # handler can store data here
+ self.data = {} #: handler can store data here
def getCaptcha(self):
diff --git a/pyload/manager/Plugin.py b/pyload/manager/Plugin.py
index 9417a6935..118dea8f0 100644
--- a/pyload/manager/Plugin.py
+++ b/pyload/manager/Plugin.py
@@ -168,7 +168,7 @@ class PluginManager(object):
except Exception:
self.core.log.error("Invalid config in %s: %s" % (name, config))
- elif folder in ("addon", "hook"): # force config creation
+ elif folder in ("addon", "hook"): #: force config creation
desc = self.DESC.findall(content)
desc = desc[0][1] if desc else ""
config = (["activated", "bool", "Activated", False],)
@@ -310,9 +310,9 @@ class PluginManager(object):
def find_module(self, fullname, path=None):
# redirecting imports if necesarry
- if fullname.startswith(self.ROOT) or fullname.startswith(self.USERROOT): # seperate pyload plugins
+ if fullname.startswith(self.ROOT) or fullname.startswith(self.USERROOT): #: seperate pyload plugins
if fullname.startswith(self.USERROOT): user = 1
- else: user = 0 # used as bool and int
+ else: user = 0 #: used as bool and int
split = fullname.split(".")
if len(split) != 4 - user:
@@ -329,7 +329,7 @@ class PluginManager(object):
def load_module(self, name, replace=True):
- if name not in sys.modules: # could be already in modules
+ if name not in sys.modules: #: could be already in modules
if replace:
if self.ROOT in name:
newname = name.replace(self.ROOT, self.USERROOT)
diff --git a/pyload/manager/Thread.py b/pyload/manager/Thread.py
index 782cf7b2a..a2a64c38d 100644
--- a/pyload/manager/Thread.py
+++ b/pyload/manager/Thread.py
@@ -33,7 +33,7 @@ class ThreadManager(object):
self.reconnecting = Event()
self.reconnecting.clear()
- self.downloaded = 0 # number of files downloaded since last cleanup
+ self.downloaded = 0 #: number of files downloaded since last cleanup
self.lock = Lock()
diff --git a/pyload/manager/thread/Download.py b/pyload/manager/thread/Download.py
index 21db61ca4..293014a2e 100644
--- a/pyload/manager/thread/Download.py
+++ b/pyload/manager/thread/Download.py
@@ -39,7 +39,7 @@ class DownloadThread(PluginThread):
while True:
del pyfile
- self.active = False # sets the thread inactive when it is ready to get next job
+ self.active = False #: sets the thread inactive when it is ready to get next job
self.active = self.queue.get()
pyfile = self.active
diff --git a/pyload/manager/thread/Info.py b/pyload/manager/thread/Info.py
index 28a2e8e91..9d8a3ef5b 100644
--- a/pyload/manager/thread/Info.py
+++ b/pyload/manager/thread/Info.py
@@ -26,13 +26,13 @@ class InfoThread(PluginThread):
PluginThread.__init__(self, manager)
self.data = data
- self.pid = pid # package id
+ self.pid = pid #: package id
# [ .. (name, plugin) .. ]
- self.rid = rid # result id
- self.add = add # add packages instead of return result
+ self.rid = rid #: result id
+ self.add = add #: add packages instead of return result
- self.cache = [] # accumulated data
+ self.cache = [] #: accumulated data
self.start()
@@ -83,7 +83,7 @@ class InfoThread(PluginThread):
# empty cache
del self.cache[:]
- else: # post the results
+ else: #: post the results
for name, url in container:
# attach container content
@@ -154,8 +154,8 @@ class InfoThread(PluginThread):
def fetchForPlugin(self, pluginname, plugin, urls, cb, err=None):
try:
- result = [] # result loaded from cache
- process = [] # urls to process
+ result = [] #: result loaded from cache
+ process = [] #: urls to process
for url in urls:
if url in self.m.infoCache:
result.append(self.m.infoCache[url])
diff --git a/pyload/manager/thread/Plugin.py b/pyload/manager/thread/Plugin.py
index 348f005a5..d8319a2ce 100644
--- a/pyload/manager/thread/Plugin.py
+++ b/pyload/manager/thread/Plugin.py
@@ -129,5 +129,5 @@ class PluginThread(Thread):
def clean(self, pyfile):
""" set thread unactive and release pyfile """
- self.active = True #release pyfile but lets the thread active
+ self.active = True #: release pyfile but lets the thread active
pyfile.release()