summaryrefslogtreecommitdiffstats
path: root/module/plugins/Account.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-09-29 00:20:39 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-09-29 00:20:39 +0200
commit7ecc4aed5425ebde0ac997e90249f4f937040771 (patch)
tree8558ae88bb034e79b77a70fff5b64d485eba6206 /module/plugins/Account.py
parentreworked authorization, now works on api level (diff)
downloadpyload-7ecc4aed5425ebde0ac997e90249f4f937040771.tar.xz
new plugin Base class providing useful methods
Diffstat (limited to 'module/plugins/Account.py')
-rw-r--r--module/plugins/Account.py19
1 files changed, 4 insertions, 15 deletions
diff --git a/module/plugins/Account.py b/module/plugins/Account.py
index 202a7ad67..c147404e0 100644
--- a/module/plugins/Account.py
+++ b/module/plugins/Account.py
@@ -22,13 +22,14 @@ from time import time
from traceback import print_exc
from threading import RLock
+from Plugin import Base
from module.utils import compare_time, parseFileSize, lock
class WrongPassword(Exception):
pass
-class Account():
+class Account(Base):
"""
Base class for every Account plugin.
Just overwrite `login` and cookies will be stored and account becomes accessible in\
@@ -48,8 +49,9 @@ class Account():
def __init__(self, manager, accounts):
+ Base.__init__(self, manager.core)
+
self.manager = manager
- self.core = manager.core
self.accounts = {}
self.infos = {} # cache for account information
self.lock = RLock()
@@ -288,16 +290,3 @@ class Account():
return False
return True
-
- #log functions
- def logInfo(self, msg):
- self.core.log.info("%s: %s" % (self.__name__, msg))
-
- def logWarning(self, msg):
- self.core.log.warning("%s: %s" % (self.__name__, msg))
-
- def logError(self, msg):
- self.core.log.error("%s: %s" % (self.__name__, msg))
-
- def logDebug(self, msg):
- self.core.log.debug("%s: %s" % (self.__name__, msg))