rpmlint/rpmlint-0.93-rpm-4.8.patch

20 lines
752 B
Diff
Raw Normal View History

Index: SpecCheck.py
===================================================================
--- SpecCheck.py (revision 1719)
+++ SpecCheck.py (working copy)
@@ -526,7 +526,13 @@
# errors logged above already
pass
if spec_obj:
- for src in spec_obj.sources():
+ try:
+ # rpm < 4.8.0
+ sources = spec_obj.sources()
+ except TypeError:
+ # rpm >= 4.8.0
+ sources = spec_obj.sources
+ for src in sources:
(url, num, flags) = src
(scheme, netloc) = urlparse(url)[0:2]
if flags & 1: # rpmspec.h, rpm.org ticket #123