Split ns only once in fix_ns().
This commit is contained in:
parent
f7e4caadfe
commit
4b482477e2
1 changed files with 3 additions and 2 deletions
|
@ -177,8 +177,9 @@ def fix_ns(xpath, split=False, propagate_ns=True, default_ns=''):
|
||||||
if '}' in ns_block:
|
if '}' in ns_block:
|
||||||
# Apply the found namespace to following elements
|
# Apply the found namespace to following elements
|
||||||
# that do not have namespaces.
|
# that do not have namespaces.
|
||||||
namespace = ns_block.split('}')[0]
|
ns_block_split = ns_block.split('}')
|
||||||
elements = ns_block.split('}')[1].split('/')
|
namespace = ns_block_split[0]
|
||||||
|
elements = ns_block_split[1].split('/')
|
||||||
else:
|
else:
|
||||||
# Apply the stanza's namespace to the following
|
# Apply the stanza's namespace to the following
|
||||||
# elements since no namespace was provided.
|
# elements since no namespace was provided.
|
||||||
|
|
Loading…
Reference in a new issue