From 7b8c458cca7d21a029620f98e453f746fce69cd1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 14 Jul 2014 16:10:01 +0200 Subject: Prefer single quote for dict key name --- module/plugins/accounts/OboomCom.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'module/plugins/accounts/OboomCom.py') 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, -- cgit v1.2.3