summaryrefslogtreecommitdiffstats
path: root/module/plugins/Account.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-10-03 16:36:31 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-10-03 16:36:31 +0200
commit204796446348040433f9759b3b44f8445c342928 (patch)
treee3fbc817279009fb3272676c59e897d019f01ea6 /module/plugins/Account.py
parentHotfileCom fix (diff)
downloadpyload-204796446348040433f9759b3b44f8445c342928.tar.xz
shareonline premiumfix, ul login check
Diffstat (limited to 'module/plugins/Account.py')
-rw-r--r--module/plugins/Account.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/module/plugins/Account.py b/module/plugins/Account.py
index 9295b78f1..96e750db6 100644
--- a/module/plugins/Account.py
+++ b/module/plugins/Account.py
@@ -17,8 +17,12 @@
@author: mkaay
"""
-from random import choice
import re
+from random import choice
+from traceback import print_exc
+
+class WrongPassword(Exception):
+ pass
class Account():
__name__ = "Account"
@@ -41,11 +45,14 @@ class Account():
def _login(self, user, data):
try:
self.login(user, data)
+ except WrongPassword:
+ self.core.log.warning(_("Could not login with account %s | %s") % (user, _("Wrong Password")))
+ data["valid"] = False
+
except Exception, e:
self.core.log.warning(_("Could not login with account %s | %s") % (user, e))
data["valid"] = False
if self.core.debug:
- from traceback import print_exc
print_exc()
def setAccounts(self, accounts):
@@ -143,3 +150,6 @@ class Account():
elif unit == "mb" or unit == "megabyte" or unit == "mbyte" or unit == "mib":
traffic *= 1024
return traffic
+
+ def wrongPassword(self):
+ raise WrongPassword