mirror of
https://github.com/mightyBroccoli/xmpp-chatbot.git
synced 2024-12-04 22:33:36 +01:00
Hotfix NoneType len exeption
* fix NoneType not having a len exeption
This commit is contained in:
parent
a4ab459c05
commit
9c3f6761e5
1 changed files with 3 additions and 3 deletions
|
@ -37,9 +37,6 @@ class ServerContact:
|
||||||
self.opt_arg = [s for s in possible_abbr if s.startswith(abbr)][0]
|
self.opt_arg = [s for s in possible_abbr if s.startswith(abbr)][0]
|
||||||
|
|
||||||
def process(self):
|
def process(self):
|
||||||
# optional argument abbreviation
|
|
||||||
self.opt_arg_abbreviation()
|
|
||||||
|
|
||||||
# get etree from base xml
|
# get etree from base xml
|
||||||
iq = Et.fromstring(str(self.contact))
|
iq = Et.fromstring(str(self.contact))
|
||||||
|
|
||||||
|
@ -62,6 +59,9 @@ class ServerContact:
|
||||||
|
|
||||||
# if one opt_arg is defined return just that one
|
# if one opt_arg is defined return just that one
|
||||||
if self.opt_arg in self.possible_vars:
|
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:
|
if child.attrib['var'] == self.opt_arg:
|
||||||
# add section to result dict and append info
|
# add section to result dict and append info
|
||||||
result[child.attrib['var']] = list()
|
result[child.attrib['var']] = list()
|
||||||
|
|
Loading…
Reference in a new issue