From 48c0c42fd6faffc56432d5f037cd575979f180cc Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 14 Jul 2014 02:23:37 +0200 Subject: Removed all @author flags + key attributes cleanup for internal & hooks plugins --- module/plugins/accounts/BitshareCom.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'module/plugins/accounts/BitshareCom.py') diff --git a/module/plugins/accounts/BitshareCom.py b/module/plugins/accounts/BitshareCom.py index 4fe01aa5b..e6999df03 100644 --- a/module/plugins/accounts/BitshareCom.py +++ b/module/plugins/accounts/BitshareCom.py @@ -13,8 +13,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, see . - - @author: pking """ from module.plugins.Account import Account @@ -26,7 +24,7 @@ class BitshareCom(Account): __type__ = "account" __description__ = """Bitshare account plugin""" __author_name__ = "Paul King" - __author_mail__ = "" + __author_mail__ = None def loadAccountInfo(self, user, req): page = req.load("http://bitshare.com/mysettings.html") -- 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/BitshareCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/BitshareCom.py') diff --git a/module/plugins/accounts/BitshareCom.py b/module/plugins/accounts/BitshareCom.py index e6999df03..09ff76efb 100644 --- a/module/plugins/accounts/BitshareCom.py +++ b/module/plugins/accounts/BitshareCom.py @@ -39,6 +39,6 @@ class BitshareCom(Account): def login(self, user, data, req): page = req.load("http://bitshare.com/login.html", - post={"user": user, "password": data["password"], "submit": "Login"}, cookies=True) + post={"user": user, "password": data['password'], "submit": "Login"}, cookies=True) if "login" in req.lastEffectiveURL: 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/BitshareCom.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'module/plugins/accounts/BitshareCom.py') diff --git a/module/plugins/accounts/BitshareCom.py b/module/plugins/accounts/BitshareCom.py index 09ff76efb..3802b2c46 100644 --- a/module/plugins/accounts/BitshareCom.py +++ b/module/plugins/accounts/BitshareCom.py @@ -22,10 +22,12 @@ class BitshareCom(Account): __name__ = "BitshareCom" __version__ = "0.12" __type__ = "account" + __description__ = """Bitshare account plugin""" __author_name__ = "Paul King" __author_mail__ = None + def loadAccountInfo(self, user, req): page = req.load("http://bitshare.com/mysettings.html") -- 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/BitshareCom.py | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'module/plugins/accounts/BitshareCom.py') diff --git a/module/plugins/accounts/BitshareCom.py b/module/plugins/accounts/BitshareCom.py index 3802b2c46..272bbeb6e 100644 --- a/module/plugins/accounts/BitshareCom.py +++ b/module/plugins/accounts/BitshareCom.py @@ -1,27 +1,12 @@ # -*- coding: utf-8 -*- -""" - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . -""" - from module.plugins.Account import Account class BitshareCom(Account): __name__ = "BitshareCom" - __version__ = "0.12" __type__ = "account" + __version__ = "0.12" __description__ = """Bitshare account plugin""" __author_name__ = "Paul King" -- cgit v1.2.3 From b0868ae6446078bacf1635dde5e4ab316b4a94cb Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 7 Oct 2014 18:57:59 +0200 Subject: New __authors__ key replaces __author_name__ and __author_mail__ + Whitespaces and EOF fixup --- module/plugins/accounts/BitshareCom.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'module/plugins/accounts/BitshareCom.py') diff --git a/module/plugins/accounts/BitshareCom.py b/module/plugins/accounts/BitshareCom.py index 272bbeb6e..e5aef16b8 100644 --- a/module/plugins/accounts/BitshareCom.py +++ b/module/plugins/accounts/BitshareCom.py @@ -9,8 +9,7 @@ class BitshareCom(Account): __version__ = "0.12" __description__ = """Bitshare account plugin""" - __author_name__ = "Paul King" - __author_mail__ = None + __authors__ = [("Paul King", None)] def loadAccountInfo(self, user, req): -- cgit v1.2.3 From ae7a7e66981456e5bbe2b54006d79b6f907be7a4 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 8 Oct 2014 20:18:13 +0200 Subject: Add __license__ key attribute to plugins --- module/plugins/accounts/BitshareCom.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/accounts/BitshareCom.py') diff --git a/module/plugins/accounts/BitshareCom.py b/module/plugins/accounts/BitshareCom.py index e5aef16b8..ea1cca53b 100644 --- a/module/plugins/accounts/BitshareCom.py +++ b/module/plugins/accounts/BitshareCom.py @@ -9,6 +9,7 @@ class BitshareCom(Account): __version__ = "0.12" __description__ = """Bitshare account plugin""" + __license__ = "GPLv3" __authors__ = [("Paul King", None)] -- cgit v1.2.3 From 6a0fb7fdd4ea2749be44625225d8a235a78f032f Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 11 Oct 2014 15:42:39 +0200 Subject: [accounts] Code cosmetics --- module/plugins/accounts/BitshareCom.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/accounts/BitshareCom.py') diff --git a/module/plugins/accounts/BitshareCom.py b/module/plugins/accounts/BitshareCom.py index ea1cca53b..910c81b4a 100644 --- a/module/plugins/accounts/BitshareCom.py +++ b/module/plugins/accounts/BitshareCom.py @@ -24,6 +24,7 @@ class BitshareCom(Account): return {"validuntil": -1, "trafficleft": -1, "premium": True} + def login(self, user, data, req): page = req.load("http://bitshare.com/login.html", post={"user": user, "password": data['password'], "submit": "Login"}, cookies=True) -- cgit v1.2.3 From 34984dae733c3f3d47b41a0acfba3724d53c65a1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 28 Oct 2014 16:52:10 +0100 Subject: Code cosmetics: plugin class attributes --- module/plugins/accounts/BitshareCom.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/accounts/BitshareCom.py') diff --git a/module/plugins/accounts/BitshareCom.py b/module/plugins/accounts/BitshareCom.py index 910c81b4a..8da3764ff 100644 --- a/module/plugins/accounts/BitshareCom.py +++ b/module/plugins/accounts/BitshareCom.py @@ -4,13 +4,13 @@ from module.plugins.Account import Account class BitshareCom(Account): - __name__ = "BitshareCom" - __type__ = "account" + __name__ = "BitshareCom" + __type__ = "account" __version__ = "0.12" __description__ = """Bitshare account plugin""" - __license__ = "GPLv3" - __authors__ = [("Paul King", None)] + __license__ = "GPLv3" + __authors__ = [("Paul King", None)] def loadAccountInfo(self, user, req): -- cgit v1.2.3 From fb65d5354c3cc80c3f48c3a2745b8dc01105edfd Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 18 Dec 2014 16:02:29 +0100 Subject: Update account plugins --- module/plugins/accounts/BitshareCom.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'module/plugins/accounts/BitshareCom.py') diff --git a/module/plugins/accounts/BitshareCom.py b/module/plugins/accounts/BitshareCom.py index 8da3764ff..960ff6c3c 100644 --- a/module/plugins/accounts/BitshareCom.py +++ b/module/plugins/accounts/BitshareCom.py @@ -14,19 +14,20 @@ class BitshareCom(Account): def loadAccountInfo(self, user, req): - page = req.load("http://bitshare.com/mysettings.html") + html = req.load("http://bitshare.com/mysettings.html") - if "\"http://bitshare.com/myupgrade.html\">Free" in page: + if "\"http://bitshare.com/myupgrade.html\">Free" in html: return {"validuntil": -1, "trafficleft": -1, "premium": False} - if not '' in page: + if not '' in html: self.logWarning(_("Activate direct Download in your Bitshare Account")) return {"validuntil": -1, "trafficleft": -1, "premium": True} def login(self, user, data, req): - page = req.load("http://bitshare.com/login.html", + html = req.load("http://bitshare.com/login.html", post={"user": user, "password": data['password'], "submit": "Login"}, cookies=True) + if "login" in req.lastEffectiveURL: self.wrongPassword() -- cgit v1.2.3