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/OverLoadMe.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'module/plugins/accounts/OverLoadMe.py') diff --git a/module/plugins/accounts/OverLoadMe.py b/module/plugins/accounts/OverLoadMe.py index eab20480f..7c57fc88c 100644 --- a/module/plugins/accounts/OverLoadMe.py +++ b/module/plugins/accounts/OverLoadMe.py @@ -14,20 +14,20 @@ class OverLoadMe(Account): def loadAccountInfo(self, user, req): data = self.getAccountData(user) - page = req.load("https://api.over-load.me/account.php", get={"user": user, "auth": data["password"]}).strip() + page = req.load("https://api.over-load.me/account.php", get={"user": user, "auth": data['password']}).strip() data = json_loads(page) # Check for premium - if data["membership"] == "Free": + if data['membership'] == "Free": return {"premium": False} - account_info = {"validuntil": data["expirationunix"], "trafficleft": -1} + account_info = {"validuntil": data['expirationunix'], "trafficleft": -1} return account_info def login(self, user, data, req): jsondata = req.load("https://api.over-load.me/account.php", - get={"user": user, "auth": data["password"]}).strip() + get={"user": user, "auth": data['password']}).strip() data = json_loads(jsondata) - if data["err"] == 1: + if data['err'] == 1: self.wrongPassword() -- cgit v1.2.3 From 8e47b0de30a25d0fd5dfb518bfe4e1e7beff93fd Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 15 Jul 2014 16:27:44 +0200 Subject: Key attributes cleanup for account, container and crypter plugins --- module/plugins/accounts/OverLoadMe.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'module/plugins/accounts/OverLoadMe.py') diff --git a/module/plugins/accounts/OverLoadMe.py b/module/plugins/accounts/OverLoadMe.py index 7c57fc88c..129074a0f 100644 --- a/module/plugins/accounts/OverLoadMe.py +++ b/module/plugins/accounts/OverLoadMe.py @@ -8,10 +8,12 @@ class OverLoadMe(Account): __name__ = "OverLoadMe" __version__ = "0.01" __type__ = "account" + __description__ = """Over-Load.me account plugin""" __author_name__ = "marley" __author_mail__ = "marley@over-load.me" + def loadAccountInfo(self, user, req): data = self.getAccountData(user) page = req.load("https://api.over-load.me/account.php", get={"user": user, "auth": data['password']}).strip() -- cgit v1.2.3 From ba916633f2bedb04c7358000b91aed69f52e8e43 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 1 Aug 2014 19:35:59 +0200 Subject: Remove trailing whitespaces + remove license headers + import urllib methods directly + sort and fix key attributes + use save_join instead join + sort some import declarations + other minor code cosmetics --- module/plugins/accounts/OverLoadMe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/OverLoadMe.py') diff --git a/module/plugins/accounts/OverLoadMe.py b/module/plugins/accounts/OverLoadMe.py index 129074a0f..34f684cb1 100644 --- a/module/plugins/accounts/OverLoadMe.py +++ b/module/plugins/accounts/OverLoadMe.py @@ -6,8 +6,8 @@ from module.common.json_layer import json_loads class OverLoadMe(Account): __name__ = "OverLoadMe" - __version__ = "0.01" __type__ = "account" + __version__ = "0.01" __description__ = """Over-Load.me account plugin""" __author_name__ = "marley" -- cgit v1.2.3