Commit 4b482477 authored by Link Mauve's avatar Link Mauve

Split ns only once in fix_ns().

parent f7e4caad
Pipeline #1861 passed with stages
in 1 minute and 5 seconds
......@@ -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('/')
# Apply the stanza's namespace to the following
# elements since no namespace was provided.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment