summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/NoPremiumPl.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-06-17 19:24:49 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-06-24 22:42:50 +0200
commit9305859b64a2f0aef3f27fb7e5b75caa0cb836a6 (patch)
treebdbb4710a4070131e1257a90a69abf4b6d080ee1 /module/plugins/accounts/NoPremiumPl.py
parentSpare code cosmetics (2) (diff)
downloadpyload-9305859b64a2f0aef3f27fb7e5b75caa0cb836a6.tar.xz
Spare code cosmetics (3)
Diffstat (limited to 'module/plugins/accounts/NoPremiumPl.py')
-rw-r--r--module/plugins/accounts/NoPremiumPl.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/module/plugins/accounts/NoPremiumPl.py b/module/plugins/accounts/NoPremiumPl.py
index 30822791b..01060250b 100644
--- a/module/plugins/accounts/NoPremiumPl.py
+++ b/module/plugins/accounts/NoPremiumPl.py
@@ -42,11 +42,11 @@ 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())
+ valid_untill = time.mktime(datetime.datetime.fromtimestamp(int(result['expire'])).timetuple())
- traffic_left = result["balance"] * 1024
+ traffic_left = result['balance'] * 1024
return {'validuntil' : valid_untill,
'trafficleft': traffic_left,
@@ -55,7 +55,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:
@@ -72,8 +72,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