summaryrefslogtreecommitdiffstats
path: root/comps.py
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>1999-08-22 15:44:32 +0000
committerMatt Wilson <msw@redhat.com>1999-08-22 15:44:32 +0000
commit56f724d6854fd7743e5bd965c438aa236a7c6d2a (patch)
treef9bb7ad9717b1f7a53e77ce3a93a47b41d2591ac /comps.py
parent0ae0956d3c9701eea4c69ac8ab4d175cc2108b04 (diff)
downloadanaconda-56f724d6854fd7743e5bd965c438aa236a7c6d2a.tar.gz
anaconda-56f724d6854fd7743e5bd965c438aa236a7c6d2a.tar.xz
anaconda-56f724d6854fd7743e5bd965c438aa236a7c6d2a.zip
fixed scoring
Diffstat (limited to 'comps.py')
-rw-r--r--comps.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/comps.py b/comps.py
index 6aaa581e5..54828cf75 100644
--- a/comps.py
+++ b/comps.py
@@ -41,12 +41,12 @@ class HeaderList:
for h in hdlist:
name = h[rpm.RPMTAG_NAME]
if self.packages.has_key(name):
- score1 = rpm.archscore(h[rpm.RPMTAG_ARCH])
- score2 = rpm.archscore(self.packages[name].h[rpm.RPMTAG_ARCH])
- if (score2 < score1):
- self.packages[h[rpm.RPMTAG_NAME]] = Package(h)
+ score1 = rpm.archscore(h['arch'])
+ score2 = rpm.archscore(self.packages[name].h['arch'])
+ if (score1 < score2):
+ self.packages[name] = Package(h)
else:
- self.packages[h[rpm.RPMTAG_NAME]] = Package(h)
+ self.packages[name] = Package(h)
class HeaderListFromFile (HeaderList):