diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-07-14 02:33:52 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-07-14 02:33:52 +0200 |
commit | 0aa95087ea8f8788499c0beaa12f39642fd204ab (patch) | |
tree | 32f51acc8a3eb447862b2bedd4a6f0d2cddb134d /module | |
parent | [Locale] templates updated (diff) | |
download | pyload-0aa95087ea8f8788499c0beaa12f39642fd204ab.tar.xz |
Fix class definition
Diffstat (limited to 'module')
-rw-r--r-- | module/CaptchaManager.py | 4 | ||||
-rw-r--r-- | module/PullEvents.py | 16 | ||||
-rw-r--r-- | module/PyPackage.py | 2 | ||||
-rw-r--r-- | module/Scheduler.py | 8 | ||||
-rw-r--r-- | module/common/JsEngine.py | 2 | ||||
-rw-r--r-- | module/database/DatabaseBackend.py | 6 | ||||
-rw-r--r-- | module/database/FileDatabase.py | 2 | ||||
-rw-r--r-- | module/database/StorageDatabase.py | 2 | ||||
-rw-r--r-- | module/database/UserDatabase.py | 2 | ||||
-rw-r--r-- | module/forwarder.py | 2 | ||||
-rw-r--r-- | module/network/CookieJar.py | 2 | ||||
-rw-r--r-- | module/network/HTTPChunk.py | 2 | ||||
-rw-r--r-- | module/network/HTTPDownload.py | 2 | ||||
-rw-r--r-- | module/network/HTTPRequest.py | 2 | ||||
-rw-r--r-- | module/network/RequestFactory.py | 2 | ||||
-rw-r--r-- | module/network/XDCCRequest.py | 2 | ||||
-rw-r--r-- | module/plugins/AccountManager.py | 2 | ||||
-rw-r--r-- | module/remote/RemoteManager.py | 2 | ||||
-rw-r--r-- | module/setup.py | 2 |
19 files changed, 32 insertions, 32 deletions
diff --git a/module/CaptchaManager.py b/module/CaptchaManager.py index 893af3068..0ba876ae8 100644 --- a/module/CaptchaManager.py +++ b/module/CaptchaManager.py @@ -21,7 +21,7 @@ from time import time from traceback import print_exc from threading import Lock -class CaptchaManager(): +class CaptchaManager: def __init__(self, core): self.lock = Lock() self.core = core @@ -80,7 +80,7 @@ class CaptchaManager(): return False -class CaptchaTask(): +class CaptchaTask: def __init__(self, id, img, format, file, result_type='textual'): self.id = str(id) self.captchaImg = img diff --git a/module/PullEvents.py b/module/PullEvents.py index b8859a9a6..d1c885f26 100644 --- a/module/PullEvents.py +++ b/module/PullEvents.py @@ -20,7 +20,7 @@ from time import time from module.utils import uniqify -class PullManager(): +class PullManager: def __init__(self, core): self.core = core self.clients = [] @@ -52,7 +52,7 @@ class PullManager(): for client in self.clients: client.addEvent(event) -class Client(): +class Client: def __init__(self, uuid): self.uuid = uuid self.lastActive = time() @@ -69,7 +69,7 @@ class Client(): def addEvent(self, event): self.events.append(event) -class UpdateEvent(): +class UpdateEvent: def __init__(self, itype, iid, destination): assert itype == "pack" or itype == "file" assert destination == "queue" or destination == "collector" @@ -80,7 +80,7 @@ class UpdateEvent(): def toList(self): return ["update", self.destination, self.type, self.id] -class RemoveEvent(): +class RemoveEvent: def __init__(self, itype, iid, destination): assert itype == "pack" or itype == "file" assert destination == "queue" or destination == "collector" @@ -91,7 +91,7 @@ class RemoveEvent(): def toList(self): return ["remove", self.destination, self.type, self.id] -class InsertEvent(): +class InsertEvent: def __init__(self, itype, iid, after, destination): assert itype == "pack" or itype == "file" assert destination == "queue" or destination == "collector" @@ -103,7 +103,7 @@ class InsertEvent(): def toList(self): return ["insert", self.destination, self.type, self.id, self.after] -class ReloadAllEvent(): +class ReloadAllEvent: def __init__(self, destination): assert destination == "queue" or destination == "collector" self.destination = destination @@ -111,10 +111,10 @@ class ReloadAllEvent(): def toList(self): return ["reload", self.destination] -class AccountUpdateEvent(): +class AccountUpdateEvent: def toList(self): return ["account"] -class ConfigUpdateEvent(): +class ConfigUpdateEvent: def toList(self): return ["config"] diff --git a/module/PyPackage.py b/module/PyPackage.py index d918faf59..ce1461241 100644 --- a/module/PyPackage.py +++ b/module/PyPackage.py @@ -20,7 +20,7 @@ from module.PullEvents import UpdateEvent from module.utils import save_path -class PyPackage(): +class PyPackage: """ Represents a package object at runtime """ diff --git a/module/Scheduler.py b/module/Scheduler.py index cdc4c8360..71b5f96af 100644 --- a/module/Scheduler.py +++ b/module/Scheduler.py @@ -26,7 +26,7 @@ class AlreadyCalled(Exception): pass -class Deferred(): +class Deferred: def __init__(self): self.call = [] self.result = () @@ -44,7 +44,7 @@ class Deferred(): f(*args ** kwargs) -class Scheduler(): +class Scheduler: def __init__(self, core): self.core = core @@ -88,7 +88,7 @@ class Scheduler(): break -class Job(): +class Job: def __init__(self, time, call, args=[], kwargs={}, deferred=None, threaded=True): self.time = float(time) self.call = call @@ -111,7 +111,7 @@ class Job(): self.run() -class PriorityQueue(): +class PriorityQueue: """ a non blocking priority queue """ def __init__(self): diff --git a/module/common/JsEngine.py b/module/common/JsEngine.py index fc641f48e..437dda6ae 100644 --- a/module/common/JsEngine.py +++ b/module/common/JsEngine.py @@ -78,7 +78,7 @@ if not ENGINE or DEBUG: except: pass -class JsEngine(): +class JsEngine: def __init__(self): self.engine = ENGINE self.init = False diff --git a/module/database/DatabaseBackend.py b/module/database/DatabaseBackend.py index a7e9c8849..6b2099736 100644 --- a/module/database/DatabaseBackend.py +++ b/module/database/DatabaseBackend.py @@ -34,7 +34,7 @@ except: DB_VERSION = 4 -class style(): +class style: db = None @classmethod @@ -65,7 +65,7 @@ class style(): return cls.db.async(f, *args, **kwargs) return x -class DatabaseJob(): +class DatabaseJob: def __init__(self, f, *args, **kwargs): self.done = Event() @@ -309,7 +309,7 @@ if __name__ == "__main__": db = DatabaseBackend() db.setup() - class Test(): + class Test: @style.queue def insert(db): c = db.createCursor() diff --git a/module/database/FileDatabase.py b/module/database/FileDatabase.py index fdcafd3c4..3536b6306 100644 --- a/module/database/FileDatabase.py +++ b/module/database/FileDatabase.py @@ -573,7 +573,7 @@ class FileHandler: """ restart all failed links """ self.db.restartFailed() -class FileMethods(): +class FileMethods: @style.queue def filecount(self, queue): """returns number of files in queue""" diff --git a/module/database/StorageDatabase.py b/module/database/StorageDatabase.py index 049f229f3..074d97d3e 100644 --- a/module/database/StorageDatabase.py +++ b/module/database/StorageDatabase.py @@ -19,7 +19,7 @@ from module.database import style from module.database import DatabaseBackend -class StorageMethods(): +class StorageMethods: @style.queue def setStorage(db, identifier, key, value): db.c.execute("SELECT id FROM storage WHERE identifier=? AND key=?", (identifier, key)) diff --git a/module/database/UserDatabase.py b/module/database/UserDatabase.py index c33dee2e8..59b0f6dbf 100644 --- a/module/database/UserDatabase.py +++ b/module/database/UserDatabase.py @@ -22,7 +22,7 @@ import random from DatabaseBackend import DatabaseBackend from DatabaseBackend import style -class UserMethods(): +class UserMethods: @style.queue def checkAuth(db, user, password): c = db.c diff --git a/module/forwarder.py b/module/forwarder.py index 59c01fa53..52d2afd71 100644 --- a/module/forwarder.py +++ b/module/forwarder.py @@ -25,7 +25,7 @@ import thread from traceback import print_exc -class Forwarder(): +class Forwarder: def __init__(self, extip, extport=9666): print "Start portforwarding to %s:%s" % (extip, extport) diff --git a/module/network/CookieJar.py b/module/network/CookieJar.py index c05812334..a6ae090bc 100644 --- a/module/network/CookieJar.py +++ b/module/network/CookieJar.py @@ -19,7 +19,7 @@ from time import time -class CookieJar(): +class CookieJar: def __init__(self, pluginname, account=None): self.cookies = {} self.plugin = pluginname diff --git a/module/network/HTTPChunk.py b/module/network/HTTPChunk.py index eeb27cf30..32e03ffd4 100644 --- a/module/network/HTTPChunk.py +++ b/module/network/HTTPChunk.py @@ -30,7 +30,7 @@ class WrongFormat(Exception): pass -class ChunkInfo(): +class ChunkInfo: def __init__(self, name): self.name = unicode(name) self.size = 0 diff --git a/module/network/HTTPDownload.py b/module/network/HTTPDownload.py index 4827b5e9d..767572231 100644 --- a/module/network/HTTPDownload.py +++ b/module/network/HTTPDownload.py @@ -31,7 +31,7 @@ from HTTPRequest import BadHeader from module.plugins.Plugin import Abort from module.utils import save_join, fs_encode -class HTTPDownload(): +class HTTPDownload: """ loads a url http + ftp """ def __init__(self, url, filename, get={}, post={}, referer=None, cj=None, bucket=None, diff --git a/module/network/HTTPRequest.py b/module/network/HTTPRequest.py index 4228725ec..1a7396dd5 100644 --- a/module/network/HTTPRequest.py +++ b/module/network/HTTPRequest.py @@ -44,7 +44,7 @@ class BadHeader(Exception): self.content = content -class HTTPRequest(): +class HTTPRequest: def __init__(self, cookies=None, options=None): self.c = pycurl.Curl() self.rep = StringIO() diff --git a/module/network/RequestFactory.py b/module/network/RequestFactory.py index 27b2e5606..6811b11d8 100644 --- a/module/network/RequestFactory.py +++ b/module/network/RequestFactory.py @@ -26,7 +26,7 @@ from CookieJar import CookieJar from XDCCRequest import XDCCRequest -class RequestFactory(): +class RequestFactory: def __init__(self, core): self.lock = Lock() self.core = core diff --git a/module/network/XDCCRequest.py b/module/network/XDCCRequest.py index d59be40c1..ca92a9b83 100644 --- a/module/network/XDCCRequest.py +++ b/module/network/XDCCRequest.py @@ -31,7 +31,7 @@ from select import select from module.plugins.Plugin import Abort -class XDCCRequest(): +class XDCCRequest: def __init__(self, timeout=30, proxies={}): self.proxies = proxies diff --git a/module/plugins/AccountManager.py b/module/plugins/AccountManager.py index 1de55effc..b046ba7a7 100644 --- a/module/plugins/AccountManager.py +++ b/module/plugins/AccountManager.py @@ -27,7 +27,7 @@ from module.utils import chmod, lock ACC_VERSION = 1 -class AccountManager(): +class AccountManager: """manages all accounts""" #---------------------------------------------------------------------- diff --git a/module/remote/RemoteManager.py b/module/remote/RemoteManager.py index 36eb52a4a..723bc0c0e 100644 --- a/module/remote/RemoteManager.py +++ b/module/remote/RemoteManager.py @@ -55,7 +55,7 @@ class BackendBase(Thread): self.shutdown() -class RemoteManager(): +class RemoteManager: available = [] def __init__(self, core): diff --git a/module/setup.py b/module/setup.py index 937ca5395..2ac196bcb 100644 --- a/module/setup.py +++ b/module/setup.py @@ -13,7 +13,7 @@ from subprocess import PIPE, call from module.utils import get_console_encoding -class Setup(): +class Setup: """ pyLoads initial setup configuration assistant """ def __init__(self, path, config): |