From 5060e4c6374a5116d0d8b02528f910f8c5f8bcf9 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 15 Jul 2014 16:25:41 +0200 Subject: Fix code indentation, some bad whitespaces and missing authors + use 'not' instead 'is None' + replace __pattern__'s r" with r' + other minor cosmetics --- module/plugins/accounts/SimplyPremiumCom.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'module/plugins/accounts/SimplyPremiumCom.py') diff --git a/module/plugins/accounts/SimplyPremiumCom.py b/module/plugins/accounts/SimplyPremiumCom.py index 1e6d66806..6ae8396db 100644 --- a/module/plugins/accounts/SimplyPremiumCom.py +++ b/module/plugins/accounts/SimplyPremiumCom.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- - ############################################################################ # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU Affero General Public License as # @@ -15,17 +14,17 @@ # along with this program. If not, see . # ############################################################################ -from module.plugins.Account import Account from module.common.json_layer import json_loads +from module.plugins.Account import Account class SimplyPremiumCom(Account): __name__ = "SimplyPremiumCom" __version__ = "0.01" __type__ = "account" - __description__ = """Simply-Premium.Com account plugin""" - __author_name__ = ("EvolutionClip") - __author_mail__ = ("evolutionclip@live.de") + __description__ = """Simply-Premium.com account plugin""" + __author_name__ = "EvolutionClip" + __author_mail__ = "evolutionclip@live.de" def loadAccountInfo(self, user, req): json_data = req.load('http://www.simply-premium.com/api/user.php?format=json') -- cgit v1.2.3 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/SimplyPremiumCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/SimplyPremiumCom.py') diff --git a/module/plugins/accounts/SimplyPremiumCom.py b/module/plugins/accounts/SimplyPremiumCom.py index 6ae8396db..5706bb5cd 100644 --- a/module/plugins/accounts/SimplyPremiumCom.py +++ b/module/plugins/accounts/SimplyPremiumCom.py @@ -49,7 +49,7 @@ class SimplyPremiumCom(Account): if data['password'] == '' or data['password'] == '0': post_data = {"key": user} else: - post_data = {"login_name": user, "login_pass": data["password"]} + post_data = {"login_name": user, "login_pass": data['password']} self.html = req.load("http://www.simply-premium.com/login.php", post=post_data) -- 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/SimplyPremiumCom.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'module/plugins/accounts/SimplyPremiumCom.py') diff --git a/module/plugins/accounts/SimplyPremiumCom.py b/module/plugins/accounts/SimplyPremiumCom.py index 5706bb5cd..37aff09b3 100644 --- a/module/plugins/accounts/SimplyPremiumCom.py +++ b/module/plugins/accounts/SimplyPremiumCom.py @@ -22,10 +22,12 @@ class SimplyPremiumCom(Account): __name__ = "SimplyPremiumCom" __version__ = "0.01" __type__ = "account" + __description__ = """Simply-Premium.com account plugin""" __author_name__ = "EvolutionClip" __author_mail__ = "evolutionclip@live.de" + def loadAccountInfo(self, user, req): json_data = req.load('http://www.simply-premium.com/api/user.php?format=json') self.logDebug("JSON data: " + json_data) -- cgit v1.2.3 From 9762ac2fe94e3c6709fc46b6e9bde99e10cb3681 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 20 Jul 2014 02:25:53 +0200 Subject: [account] self.html -> html (where was possible) --- module/plugins/accounts/SimplyPremiumCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/accounts/SimplyPremiumCom.py') diff --git a/module/plugins/accounts/SimplyPremiumCom.py b/module/plugins/accounts/SimplyPremiumCom.py index 37aff09b3..6eace8838 100644 --- a/module/plugins/accounts/SimplyPremiumCom.py +++ b/module/plugins/accounts/SimplyPremiumCom.py @@ -53,7 +53,7 @@ class SimplyPremiumCom(Account): else: post_data = {"login_name": user, "login_pass": data['password']} - self.html = req.load("http://www.simply-premium.com/login.php", post=post_data) + html = req.load("http://www.simply-premium.com/login.php", post=post_data) - if 'logout' not in self.html: + if 'logout' not in html: self.wrongPassword() -- 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/SimplyPremiumCom.py | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'module/plugins/accounts/SimplyPremiumCom.py') diff --git a/module/plugins/accounts/SimplyPremiumCom.py b/module/plugins/accounts/SimplyPremiumCom.py index 6eace8838..b0a62f83b 100644 --- a/module/plugins/accounts/SimplyPremiumCom.py +++ b/module/plugins/accounts/SimplyPremiumCom.py @@ -1,18 +1,4 @@ # -*- coding: utf-8 -*- -############################################################################ -# This program is free software: you can redistribute it and/or modify # -# it under the terms of the GNU Affero General Public License as # -# published by the Free Software Foundation, either version 3 of the # -# License, or (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU Affero General Public License for more details. # -# # -# You should have received a copy of the GNU Affero General Public License # -# along with this program. If not, see . # -############################################################################ from module.common.json_layer import json_loads from module.plugins.Account import Account @@ -20,8 +6,8 @@ from module.plugins.Account import Account class SimplyPremiumCom(Account): __name__ = "SimplyPremiumCom" - __version__ = "0.01" __type__ = "account" + __version__ = "0.01" __description__ = """Simply-Premium.com account plugin""" __author_name__ = "EvolutionClip" -- cgit v1.2.3