From 20226f8cc5889efbefa61209e1adf6184d42cd00 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 17 Apr 2015 01:21:41 +0200 Subject: Spare code cosmetics (3) --- pyload/plugin/account/NoPremiumPl.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'pyload/plugin/account/NoPremiumPl.py') diff --git a/pyload/plugin/account/NoPremiumPl.py b/pyload/plugin/account/NoPremiumPl.py index d825b38ed..98f472848 100644 --- a/pyload/plugin/account/NoPremiumPl.py +++ b/pyload/plugin/account/NoPremiumPl.py @@ -43,10 +43,10 @@ class NoPremiumPl(Account): premium = False valid_untill = -1 - if "expire" in result.keys() and result["expire"]: + if "expire" in result.keys() and result['expire']: premium = True - valid_untill = time.mktime(datetime.datetime.fromtimestamp(int(result["expire"])).timetuple()) - traffic_left = result["balance"] * 2 ** 20 + valid_untill = time.mktime(datetime.datetime.fromtimestamp(int(result['expire'])).timetuple()) + traffic_left = result['balance'] * 2 ** 20 return ({ "validuntil": valid_untill, @@ -57,7 +57,7 @@ class NoPremiumPl(Account): def login(self, user, data, req): self._usr = user - self._pwd = hashlib.sha1(hashlib.md5(data["password"]).hexdigest()).hexdigest() + self._pwd = hashlib.sha1(hashlib.md5(data['password']).hexdigest()).hexdigest() self._req = req try: @@ -73,8 +73,8 @@ class NoPremiumPl(Account): def createAuthQuery(self): query = self._api_query - query["username"] = self._usr - query["password"] = self._pwd + query['username'] = self._usr + query['password'] = self._pwd return query -- cgit v1.2.3 From bb5a115533711fd8bb87f53cb32ff7342137208d Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 18 Apr 2015 00:29:55 +0200 Subject: Spare code cosmetics (5) --- pyload/plugin/account/NoPremiumPl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pyload/plugin/account/NoPremiumPl.py') diff --git a/pyload/plugin/account/NoPremiumPl.py b/pyload/plugin/account/NoPremiumPl.py index 98f472848..6cefed550 100644 --- a/pyload/plugin/account/NoPremiumPl.py +++ b/pyload/plugin/account/NoPremiumPl.py @@ -37,7 +37,7 @@ class NoPremiumPl(Account): try: result = json_loads(self.runAuthQuery()) except Exception: - # todo: return or let it be thrown? + #@TODO: return or let it be thrown? return premium = False -- cgit v1.2.3