Hi,
On 03/19/2010 05:57 PM, Brian C. Lane wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 03/19/2010 04:05 AM, Hans de Goede wrote:
+
+ import storage
+ if isinstance(d, storage.devices.NetworkStorageDevice):
+ s = args.append(self.anaconda.network.dracutSetupString(d))
+ if s not in args:
+ args.append(s)
I think this bit should just be:
args.append(self.anaconda.network.dracutSetupString(d))
Oh, good catch, although what it should be is:
+ if isinstance(d, storage.devices.NetworkStorageDevice):
+ s = self.anaconda.network.dracutSetupString(d)
+ if s not in args:
+ args.append(s)
This way we won't get the dracut kernel cmdline arguments for bringing
up the NIC twice, if we somehow need 2 disks connected through the same
network adapter during early boot.
What are your thoughts on imports inside of methods? I see the import
storage was there previously, but in general I like imports at the top
of the module so I can keep track of what gets used and what's already
available for the module as a whole. Python will only evaluate the
import once, but it seems inefficient to have it inside a loop like that.
Normally I prefer imports at the top too, but iirc it was done this way
because otherwise things would not work due to an import loop.
Thanks for the review!
Regards,
Hans
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list