Re: [PATCH 2/4] Hookup new python EDD code (#478996)

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

 



> @@ -599,7 +600,10 @@ class PartitionData(commands.partition.F12_PartData):
>          storage.doAutoPart = False
>  
>          if self.onbiosdisk != "":
> -            self.disk = isys.doGetBiosDisk(self.onbiosdisk)
> +            for disk in storage.edd_dict:
> +                if str(storage.edd_dict[disk]) == self.onbiosdisk:
> +                    self.disk = disk
> +                    break
>  
>              if self.disk == "":
>                  raise KickstartValueError, formatErrorMsg(self.lineno, msg="Specified BIOS disk %s cannot be determined" % self.onbiosdisk)

A more pythonish way of writing this would be:

   for (disk, biosdisk) in storage.edd_dict.iteritems():
      if str(biosdisk) == self.onbiosdisk:
         self.disk = disk
         break

- Chris

_______________________________________________
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