summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/BayfilesCom.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/accounts/BayfilesCom.py')
-rw-r--r--module/plugins/accounts/BayfilesCom.py20
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()