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

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

 



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.

Ales

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux