diff options
author | 2013-07-23 20:22:42 +0200 | |
---|---|---|
committer | 2013-07-23 20:40:59 +0200 | |
commit | 4a81799278ae003bfbd7897f7bcd1ef46642d953 (patch) | |
tree | 59e580fc761103cfacd9190bc9c55a5a01367f47 /pyload/plugins/accounts/BayfilesCom.py | |
parent | little cleanup, added some tests (diff) | |
download | pyload-4a81799278ae003bfbd7897f7bcd1ef46642d953.tar.xz |
Fixed PEP 8 violations in Accounts
(cherry picked from commit f5535809bebc6cc343475704832c8fd8674d2d06)
Conflicts:
pyload/plugins/accounts/AlldebridCom.py
pyload/plugins/accounts/Premium4Me.py
pyload/plugins/accounts/PremiumizeMe.py
pyload/plugins/accounts/RealdebridCom.py
Diffstat (limited to 'pyload/plugins/accounts/BayfilesCom.py')
-rw-r--r-- | pyload/plugins/accounts/BayfilesCom.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pyload/plugins/accounts/BayfilesCom.py b/pyload/plugins/accounts/BayfilesCom.py index 0d036488b..bf5cc54af 100644 --- a/pyload/plugins/accounts/BayfilesCom.py +++ b/pyload/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() |