Fix iterating spec sources with rpm >= 4.8.0.
http://rpm.org/wiki/Releases/4.8.0#Specclass git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1720 9bc8b190-ac0f-0410-8968-dc7d1f502856
This commit is contained in:
parent
d0bddfc446
commit
6a9d13abcb
|
@ -526,7 +526,13 @@ class SpecCheck(AbstractCheck.AbstractCheck):
|
|||
# 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
|
||||
|
|
Loading…
Reference in New Issue