diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-10-03 16:36:31 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-10-03 16:36:31 +0200 |
commit | 204796446348040433f9759b3b44f8445c342928 (patch) | |
tree | e3fbc817279009fb3272676c59e897d019f01ea6 /module/plugins/Account.py | |
parent | HotfileCom fix (diff) | |
download | pyload-204796446348040433f9759b3b44f8445c342928.tar.xz |
shareonline premiumfix, ul login check
Diffstat (limited to 'module/plugins/Account.py')
-rw-r--r-- | module/plugins/Account.py | 14 |
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 |