From 48c0c42fd6faffc56432d5f037cd575979f180cc Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@gmail.com> Date: Mon, 14 Jul 2014 02:23:37 +0200 Subject: Removed all @author flags + key attributes cleanup for internal & hooks plugins --- module/plugins/hooks/MultiHome.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'module/plugins/hooks/MultiHome.py') diff --git a/module/plugins/hooks/MultiHome.py b/module/plugins/hooks/MultiHome.py index b1635a588..5a7e53b0d 100644 --- a/module/plugins/hooks/MultiHome.py +++ b/module/plugins/hooks/MultiHome.py @@ -13,8 +13,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>. - - @author: mkaay """ from time import time @@ -25,12 +23,16 @@ from module.plugins.Hook import Hook class MultiHome(Hook): __name__ = "MultiHome" __version__ = "0.11" - __description__ = """Ip address changer""" + __type__ = "hook" + __config__ = [("activated", "bool", "Activated", False), ("interfaces", "str", "Interfaces", "None")] + + __description__ = """Ip address changer""" __author_name__ = "mkaay" __author_mail__ = "mkaay@mkaay.de" + def setup(self): self.register = {} self.interfaces = [] -- cgit v1.2.3 From 5060e4c6374a5116d0d8b02528f910f8c5f8bcf9 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@gmail.com> 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/hooks/MultiHome.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hooks/MultiHome.py') diff --git a/module/plugins/hooks/MultiHome.py b/module/plugins/hooks/MultiHome.py index 5a7e53b0d..31bbbcc9a 100644 --- a/module/plugins/hooks/MultiHome.py +++ b/module/plugins/hooks/MultiHome.py @@ -73,6 +73,7 @@ class MultiHome(Hook): class Interface(object): + def __init__(self, adress): self.adress = adress self.history = {} -- cgit v1.2.3 From 7b8c458cca7d21a029620f98e453f746fce69cd1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@gmail.com> Date: Mon, 14 Jul 2014 16:10:01 +0200 Subject: Prefer single quote for dict key name --- module/plugins/hooks/MultiHome.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hooks/MultiHome.py') diff --git a/module/plugins/hooks/MultiHome.py b/module/plugins/hooks/MultiHome.py index 31bbbcc9a..b9c663046 100644 --- a/module/plugins/hooks/MultiHome.py +++ b/module/plugins/hooks/MultiHome.py @@ -38,7 +38,7 @@ class MultiHome(Hook): self.interfaces = [] self.parseInterfaces(self.getConfig("interfaces").split(";")) if not self.interfaces: - self.parseInterfaces([self.config["download"]["interface"]]) + self.parseInterfaces([self.config['download']['interface']]) self.setConfig("interfaces", self.toConfig()) def toConfig(self): -- cgit v1.2.3 From ba916633f2bedb04c7358000b91aed69f52e8e43 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@gmail.com> 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/hooks/MultiHome.py | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'module/plugins/hooks/MultiHome.py') diff --git a/module/plugins/hooks/MultiHome.py b/module/plugins/hooks/MultiHome.py index b9c663046..e2167b65e 100644 --- a/module/plugins/hooks/MultiHome.py +++ b/module/plugins/hooks/MultiHome.py @@ -1,20 +1,5 @@ # -*- 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 <http://www.gnu.org/licenses/>. -""" - from time import time from module.plugins.Hook import Hook @@ -22,8 +7,8 @@ from module.plugins.Hook import Hook class MultiHome(Hook): __name__ = "MultiHome" - __version__ = "0.11" __type__ = "hook" + __version__ = "0.11" __config__ = [("activated", "bool", "Activated", False), ("interfaces", "str", "Interfaces", "None")] -- cgit v1.2.3