From 9c3f6761e5f7749125a0d4939cd1809aabdfd2be Mon Sep 17 00:00:00 2001 From: nico Date: Sun, 11 Nov 2018 23:38:38 +0100 Subject: Hotfix NoneType len exeption * fix NoneType not having a len exeption --- classes/servercontact.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/classes/servercontact.py b/classes/servercontact.py index 031ef67..c2f4ad5 100644 --- a/classes/servercontact.py +++ b/classes/servercontact.py @@ -37,9 +37,6 @@ class ServerContact: self.opt_arg = [s for s in possible_abbr if s.startswith(abbr)][0] def process(self): - # optional argument abbreviation - self.opt_arg_abbreviation() - # get etree from base xml iq = Et.fromstring(str(self.contact)) @@ -62,6 +59,9 @@ class ServerContact: # if one opt_arg is defined return just that one if self.opt_arg in self.possible_vars: + # check for possible abbreviations to the optional argument + self.opt_arg_abbreviation() + if child.attrib['var'] == self.opt_arg: # add section to result dict and append info result[child.attrib['var']] = list() -- cgit v1.2.3-54-g00ecf