diff options
author | Mike Fulbright <msf@redhat.com> | 2001-07-20 01:45:40 +0000 |
---|---|---|
committer | Mike Fulbright <msf@redhat.com> | 2001-07-20 01:45:40 +0000 |
commit | ab3865fba0e6ddce1332cc4a76323198b1521a5a (patch) | |
tree | 0a755ba3d8910d608423daacadda08cea000eb44 /videocard.py | |
parent | 27d3a52b9d9941e7d57d689e1d3217c91c1b082c (diff) | |
download | anaconda-ab3865fba0e6ddce1332cc4a76323198b1521a5a.tar.gz anaconda-ab3865fba0e6ddce1332cc4a76323198b1521a5a.tar.xz anaconda-ab3865fba0e6ddce1332cc4a76323198b1521a5a.zip |
Properly merge all referenced videocards when reading in cards db
Diffstat (limited to 'videocard.py')
-rw-r--r-- | videocard.py | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/videocard.py b/videocard.py index b9eafb85b..a05f4cfac 100644 --- a/videocard.py +++ b/videocard.py @@ -28,15 +28,6 @@ Video_cardslist = {} def Video_cardsDBLookup(thecard): card = Video_cardslist[thecard] - origcard = copy.copy(card) - - count = 0 - while count < 16 and card.has_key ("SEE"): - card = Video_cardslist[card["SEE"]] - count = count + 1 - - if count >= 16: - raise RuntimeError, "Could not find card %s" % (origcard,) return card @@ -308,6 +299,22 @@ class VideoCardInfo: if len (line) > 4 and line[0:4] == 'NAME': name = line[5:] + + if len (line) > 3 and line[0:3] == 'SEE': + info = string.splitfields (line, ' ') + seecard = string.joinfields(info[1:], ' ') + refcard = Video_cardslist[seecard] + + for k in ["CHIPSET", "SERVER", "RAMDAC", "CLOCKCHIP", + "DACSPEED", "DRIVER", "UNSUPPORTED", "NOCLOCKPROBE"]: + if not card.has_key(k) and refcard.has_key(k): + card[k] = refcard[k] + + if refcard.has_key("LINE"): + if not card.has_key("LINE"): + card["LINE"] = refcard["LINE"] + else: + card["LINE"] = card["LINE"] + "\n" + refcard["LINE"] info = string.splitfields (line, ' ') if card.has_key (info[0]): |