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()
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
Name: python-xmltramp
|
||||
Version: 2.17
|
||||
Release: 11%{?dist}
|
||||
Release: 12%{?dist}
|
||||
Summary: Pythonic API for XML
|
||||
|
||||
Group: Development/Languages
|
||||
|
|
@ -12,6 +12,7 @@ License: GPLv2
|
|||
|
||||
URL: http://www.aaronsw.com/2002/xmltramp/
|
||||
Source0: http://www.aaronsw.com/2002/xmltramp/xmltramp-%{version}.py
|
||||
Patch0: %{name}-%{version}-nsprefixes.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
BuildArch: noarch
|
||||
|
|
@ -22,14 +23,19 @@ xmltramp is a simple Pythonic API for working with XML
|
|||
|
||||
%prep
|
||||
%setup -c -T
|
||||
cp -p %{SOURCE0} xmltramp.py
|
||||
%patch0 -p1 -b.nsprefixes
|
||||
|
||||
%build
|
||||
# noarch
|
||||
|
||||
%check
|
||||
%{__python} xmltramp.py
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
mkdir -p $RPM_BUILD_ROOT/%{python_sitelib}/
|
||||
cp -p %{SOURCE0} $RPM_BUILD_ROOT/%{python_sitelib}/xmltramp.py
|
||||
cp -p xmltramp.py $RPM_BUILD_ROOT/%{python_sitelib}/
|
||||
|
||||
|
||||
%clean
|
||||
|
|
@ -42,6 +48,9 @@ rm -rf $RPM_BUILD_ROOT
|
|||
|
||||
|
||||
%changelog
|
||||
* Fri Jun 07 2013 Dan Callaghan <dcallagh@redhat.com> - 2.17-12
|
||||
- Patch for RHBZ#750694
|
||||
|
||||
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.17-11
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue