diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-07-24 16:11:58 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-07-24 16:11:58 +0200 |
commit | 761ca5c66e07559925ebbdbc6531f9ca658b12ce (patch) | |
tree | bbdf0f330be882877a28366a852c90711c709338 /module/plugins/accounts | |
parent | Hotfixes (2) (diff) | |
download | pyload-761ca5c66e07559925ebbdbc6531f9ca658b12ce.tar.xz |
Code cosmetics
Diffstat (limited to 'module/plugins/accounts')
-rw-r--r-- | module/plugins/accounts/FilecloudIo.py | 4 | ||||
-rw-r--r-- | module/plugins/accounts/HellshareCz.py | 2 | ||||
-rw-r--r-- | module/plugins/accounts/LetitbitNet.py | 2 | ||||
-rw-r--r-- | module/plugins/accounts/LinksnappyCom.py | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/module/plugins/accounts/FilecloudIo.py b/module/plugins/accounts/FilecloudIo.py index 379dcfac3..021160f03 100644 --- a/module/plugins/accounts/FilecloudIo.py +++ b/module/plugins/accounts/FilecloudIo.py @@ -22,9 +22,9 @@ class FilecloudIo(Account): rep = self.load("https://secure.filecloud.io/api-fetch_apikey.api", post={'username': user, 'password': self.get_account_data(user)['password']}) rep = json_loads(rep) - if rep['status'] == 'ok': + if rep['status'] == "ok": break - elif rep['status'] == 'error' and rep['message'] == 'no such user or wrong password': + elif rep['status'] == "error" and rep['message'] == "no such user or wrong password": self.log_error(_("Wrong username or password")) return {'valid': False, 'premium': False} else: diff --git a/module/plugins/accounts/HellshareCz.py b/module/plugins/accounts/HellshareCz.py index 3b689e275..08030895a 100644 --- a/module/plugins/accounts/HellshareCz.py +++ b/module/plugins/accounts/HellshareCz.py @@ -37,7 +37,7 @@ class HellshareCz(Account): #: Time-based account vt = [int(x) for x in credit.split('.')[:2]] lt = time.localtime() - year = lt.tm_year + int(vt[1] < lt.tm_mon or (vt[1] == lt.tm_mon and vt[0] < lt.tm_mday)) + year = lt.tm_year + int(vt[1] < lt.tm_mon or (vt[1] is lt.tm_mon and vt[0] < lt.tm_mday)) validuntil = time.mktime(time.strptime("%s%d 23:59:59" % (credit, year), "%d.%m.%Y %H:%M:%S")) trafficleft = -1 else: diff --git a/module/plugins/accounts/LetitbitNet.py b/module/plugins/accounts/LetitbitNet.py index 492d2db77..c4265761a 100644 --- a/module/plugins/accounts/LetitbitNet.py +++ b/module/plugins/accounts/LetitbitNet.py @@ -24,7 +24,7 @@ class LetitbitNet(Account): # self.log_debug("API Key Info: " + api_rep) # api_rep = json_loads(api_rep) # - # if api_rep['status'] == 'FAIL': + # if api_rep['status'] == "FAIL": # self.log_warning(api_rep['data']) # return {'valid': False, 'premium': False} diff --git a/module/plugins/accounts/LinksnappyCom.py b/module/plugins/accounts/LinksnappyCom.py index 03ddc31e6..adad37148 100644 --- a/module/plugins/accounts/LinksnappyCom.py +++ b/module/plugins/accounts/LinksnappyCom.py @@ -33,10 +33,10 @@ class LinksnappyCom(Account): validuntil = j['return']['expire'] - if validuntil == 'lifetime': + if validuntil == "lifetime": validuntil = -1 - elif validuntil == 'expired': + elif validuntil == "expired": return {'premium': False} else: |