diff options
Diffstat (limited to 'slixmpp/xmlstream/stanzabase.py')
-rw-r--r-- | slixmpp/xmlstream/stanzabase.py | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/slixmpp/xmlstream/stanzabase.py b/slixmpp/xmlstream/stanzabase.py index 605dbb61..1c000b69 100644 --- a/slixmpp/xmlstream/stanzabase.py +++ b/slixmpp/xmlstream/stanzabase.py @@ -177,8 +177,9 @@ def fix_ns(xpath, split=False, propagate_ns=True, default_ns=''): if '}' in ns_block: # Apply the found namespace to following elements # that do not have namespaces. - namespace = ns_block.split('}')[0] - elements = ns_block.split('}')[1].split('/') + ns_block_split = ns_block.split('}') + namespace = ns_block_split[0] + elements = ns_block_split[1].split('/') else: # Apply the stanza's namespace to the following # elements since no namespace was provided. @@ -1291,15 +1292,6 @@ class ElementBase(object): def __bool__(self): """Stanza objects should be treated as True in boolean contexts. - - Python 3.x version. - """ - return True - - def __nonzero__(self): - """Stanza objects should be treated as True in boolean contexts. - - Python 2.x version. """ return True |