Patch for RHBZ#750694
This commit is contained in:
parent
ca04263e2f
commit
f4bf3518ec
2 changed files with 31 additions and 2 deletions
20
python-xmltramp-2.17-nsprefixes.patch
Normal file
20
python-xmltramp-2.17-nsprefixes.patch
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
--- a/xmltramp.py 2011-01-07 15:27:58.000000000 +1000
|
||||
+++ b/xmltramp.py 2011-11-02 14:03:07.881107507 +1000
|
||||
@@ -224,7 +224,9 @@
|
||||
|
||||
attrs = dict(attrs)
|
||||
newprefixes = {}
|
||||
- for k in self.prefixes.keys(): newprefixes[k] = self.prefixes[k][-1]
|
||||
+ for k in self.prefixes.keys():
|
||||
+ if self.prefixes[k]:
|
||||
+ newprefixes[k] = self.prefixes[k][-1]
|
||||
|
||||
self.stack.append(Element(name, attrs, prefixes=newprefixes.copy()))
|
||||
|
||||
@@ -357,5 +359,6 @@
|
||||
|
||||
assert parse('<x a="<"></x>').__repr__(1) == '<x a="<"></x>'
|
||||
assert parse('<a xmlns="http://a"><b xmlns="http://b"/></a>').__repr__(1) == '<a xmlns="http://a"><b xmlns="http://b"></b></a>'
|
||||
+ assert parse('<a><b xmlns="http://b"/><c/></a>').__repr__(1) == '<a><b xmlns="http://b"></b><c></c></a>'
|
||||
|
||||
if __name__ == '__main__': unittest()
|
||||
Loading…
Add table
Add a link
Reference in a new issue