diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-11-10 00:19:51 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-11-10 00:19:51 +0100 |
commit | c9e31d875d32de31e54959b82bc35eff2b3e0f3f (patch) | |
tree | 5022eadf2ac5c65ba075f172af873b737310ed66 /module/plugins/accounts/BayfilesCom.py | |
parent | [Keep2shareCc] Fix account __name__ (diff) | |
download | pyload-c9e31d875d32de31e54959b82bc35eff2b3e0f3f.tar.xz |
Code cosmetics
Diffstat (limited to 'module/plugins/accounts/BayfilesCom.py')
-rw-r--r-- | module/plugins/accounts/BayfilesCom.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/module/plugins/accounts/BayfilesCom.py b/module/plugins/accounts/BayfilesCom.py index b32003688..b2295c3f1 100644 --- a/module/plugins/accounts/BayfilesCom.py +++ b/module/plugins/accounts/BayfilesCom.py @@ -18,20 +18,20 @@ class BayfilesCom(Account): def loadAccountInfo(self, user, req): for _i in xrange(2): - response = json_loads(req.load("http://api.bayfiles.com/v1/account/info")) - self.logDebug(response) - if not response['error']: + res = json_loads(req.load("http://api.bayfiles.com/v1/account/info")) + self.logDebug(res) + if not res['error']: break - self.logWarning(response['error']) + self.logWarning(res['error']) self.relogin(user) - return {"premium": bool(response['premium']), "trafficleft": -1, - "validuntil": response['expires'] if response['expires'] >= int(time()) else -1} + return {"premium": bool(res['premium']), "trafficleft": -1, + "validuntil": res['expires'] if res['expires'] >= int(time()) else -1} def login(self, user, data, req): - response = json_loads(req.load("http://api.bayfiles.com/v1/account/login/%s/%s" % (user, data['password']))) - self.logDebug(response) - if response['error']: - self.logError(response['error']) + res = json_loads(req.load("http://api.bayfiles.com/v1/account/login/%s/%s" % (user, data['password']))) + self.logDebug(res) + if res['error']: + self.logError(res['error']) self.wrongPassword() |