[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH 3/3] Carry rdloaddriver= parameters through to the boot loader config.



On 08/11/2011 04:44 AM, Ales Kozumplik wrote:
On 08/10/2011 08:16 PM, David Cantrell wrote:
- cmdlineDict[key] = val
+ if key.lower() == "rdloaddriver":
+ key = key.lower()
+
+ if cmdlineDict.has_key(key):
+ if type(cmdlineDict[key]) == type(set()):
+ cmdlineDict[key].add(val)
+ else:
+ tmpset = set()
+ tmpset.add(cmdlineDict[key])
+ tmpset.add(val)
+ cmdlineDict[key] = tmpset
+ else:
+ cmdlineDict[key] = val

Hi,

I think at this point when we clearly need to hold certain key's values
as sets it would be better if we changed the cmdlineDict's values to be
always a set, so the client code knows what to expect. For instance in
network.py, there is:

bootif_mac = flags.cmdline.get("BOOTIF")[3:].replace("-", ":").upper()

But if two BOOTIFs were entered as the boot arguments,
cmdlineDict["BOOTIF"] is a set and the [3:] will traceback.

Alternatively, we can define some keys to always have set values and the
remaining keys to always have string values.

New patches coming up, removing this set() usage in cmdLineDict as I will change it to supporting rdloaddriver= just once.

--
David Cantrell <dcantrell redhat com>
Supervisor, Installer Engineering Team
Red Hat, Inc. | Westford, MA | EST5EDT


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]