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/FastixRu.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/accounts/FastixRu.py') diff --git a/module/plugins/accounts/FastixRu.py b/module/plugins/accounts/FastixRu.py index dbfd1f33e..6aec55a84 100644 --- a/module/plugins/accounts/FastixRu.py +++ b/module/plugins/accounts/FastixRu.py @@ -14,7 +14,7 @@ class FastixRu(Account): def loadAccountInfo(self, user, req): data = self.getAccountData(user) - page = req.load("http://fastix.ru/api_v2/?apikey=%s&sub=getaccountdetails" % (data["api"])) + page = req.load("http://fastix.ru/api_v2/?apikey=%s&sub=getaccountdetails" % (data['api'])) page = json_loads(page) points = page['points'] kb = float(points) @@ -26,9 +26,9 @@ class FastixRu(Account): return account_info def login(self, user, data, req): - page = req.load("http://fastix.ru/api_v2/?sub=get_apikey&email=%s&password=%s" % (user, data["password"])) + page = req.load("http://fastix.ru/api_v2/?sub=get_apikey&email=%s&password=%s" % (user, data['password'])) api = json_loads(page) api = api['apikey'] - data["api"] = api + data['api'] = api if "error_code" in page: 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/FastixRu.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'module/plugins/accounts/FastixRu.py') diff --git a/module/plugins/accounts/FastixRu.py b/module/plugins/accounts/FastixRu.py index 6aec55a84..9e8d1f4fe 100644 --- a/module/plugins/accounts/FastixRu.py +++ b/module/plugins/accounts/FastixRu.py @@ -8,10 +8,12 @@ class FastixRu(Account): __name__ = "FastixRu" __version__ = "0.02" __type__ = "account" + __description__ = """Fastix account plugin""" __author_name__ = "Massimo Rosamilia" __author_mail__ = "max@spiritix.eu" + def loadAccountInfo(self, user, req): data = self.getAccountData(user) page = req.load("http://fastix.ru/api_v2/?apikey=%s&sub=getaccountdetails" % (data['api'])) -- 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/FastixRu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/FastixRu.py') diff --git a/module/plugins/accounts/FastixRu.py b/module/plugins/accounts/FastixRu.py index 9e8d1f4fe..7e46ccd05 100644 --- a/module/plugins/accounts/FastixRu.py +++ b/module/plugins/accounts/FastixRu.py @@ -6,8 +6,8 @@ from module.common.json_layer import json_loads class FastixRu(Account): __name__ = "FastixRu" - __version__ = "0.02" __type__ = "account" + __version__ = "0.02" __description__ = """Fastix account plugin""" __author_name__ = "Massimo Rosamilia" -- cgit v1.2.3