diff options
author | 2013-07-23 20:22:42 +0200 | |
---|---|---|
committer | 2013-07-23 20:22:42 +0200 | |
commit | f5535809bebc6cc343475704832c8fd8674d2d06 (patch) | |
tree | c59bc1e6d71c04f5545ea262056c0c5be1bd8910 /module/plugins/accounts/BayfilesCom.py | |
parent | Fixed PEP 8 violations in Hosters (diff) | |
download | pyload-f5535809bebc6cc343475704832c8fd8674d2d06.tar.xz |
Fixed PEP 8 violations in Accounts
Diffstat (limited to 'module/plugins/accounts/BayfilesCom.py')
-rw-r--r-- | module/plugins/accounts/BayfilesCom.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/module/plugins/accounts/BayfilesCom.py b/module/plugins/accounts/BayfilesCom.py index 0d036488b..bf5cc54af 100644 --- a/module/plugins/accounts/BayfilesCom.py +++ b/module/plugins/accounts/BayfilesCom.py @@ -17,10 +17,11 @@ @author: zoidberg """ +from time import time + from module.plugins.Account import Account from module.common.json_layer import json_loads -import re -from time import time, mktime, strptime + class BayfilesCom(Account): __name__ = "BayfilesCom" @@ -33,14 +34,13 @@ class BayfilesCom(Account): def loadAccountInfo(self, user, req): for i in range(2): response = json_loads(req.load("http://api.bayfiles.com/v1/account/info")) - self.logDebug(response) - if not response["error"]: + self.logDebug(response) + if not response["error"]: break self.logWarning(response["error"]) self.relogin() - - return {"premium": bool(response['premium']), \ - "trafficleft": -1, \ + + return {"premium": bool(response['premium']), "trafficleft": -1, "validuntil": response['expires'] if response['expires'] >= int(time()) else -1} def login(self, user, data, req): @@ -48,4 +48,4 @@ class BayfilesCom(Account): self.logDebug(response) if response["error"]: self.logError(response["error"]) - self.wrongPassword()
\ No newline at end of file + self.wrongPassword() |