diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-07-14 16:10:01 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-07-15 16:26:07 +0200 |
commit | 7b8c458cca7d21a029620f98e453f746fce69cd1 (patch) | |
tree | 9e97b0003a00ff8ac9ee6b777d94bb998c911d05 /module/plugins/accounts/OboomCom.py | |
parent | Fix code indentation, some bad whitespaces and missing authors + use 'not' in... (diff) | |
download | pyload-7b8c458cca7d21a029620f98e453f746fce69cd1.tar.xz |
Prefer single quote for dict key name
Diffstat (limited to 'module/plugins/accounts/OboomCom.py')
-rw-r--r-- | module/plugins/accounts/OboomCom.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/module/plugins/accounts/OboomCom.py b/module/plugins/accounts/OboomCom.py index 19fcea67a..b21e793fd 100644 --- a/module/plugins/accounts/OboomCom.py +++ b/module/plugins/accounts/OboomCom.py @@ -16,7 +16,7 @@ class OboomCom(Account): __author_mail__ = "stanley.foerster@gmail.com" def loadAccountData(self, user, req): - passwd = self.getAccountData(user)["password"] + passwd = self.getAccountData(user)['password'] salt = passwd[::-1] pbkdf2 = PBKDF2(passwd, salt, 1000).hexread(16) result = json_loads(req.load("https://www.oboom.com/1.0/login", get={"auth": user, "pass": pbkdf2})) @@ -27,17 +27,17 @@ class OboomCom(Account): def loadAccountInfo(self, name, req): accountData = self.loadAccountData(name, req) - userData = accountData["user"] + userData = accountData['user'] if "premium_unix" in userData: - validUntilUtc = int(userData["premium_unix"]) + validUntilUtc = int(userData['premium_unix']) if validUntilUtc > int(time.time()): premium = True validUntil = validUntilUtc - traffic = userData["traffic"] - trafficLeft = traffic["current"] - maxTraffic = traffic["max"] - session = accountData["session"] + traffic = userData['traffic'] + trafficLeft = traffic['current'] + maxTraffic = traffic['max'] + session = accountData['session'] return {"premium": premium, "validuntil": validUntil, "trafficleft": trafficLeft / 1024, |