Re: [PATCH] Handle request.drive being a list or string (#485622)

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

 



Jeremy Katz wrote:
On Thursday, February 19 2009, David Cantrell said:
Prevents tracebacks with 'KeyError: 's''.  request.drive can be a
list or a string and when iterating it with a for loop, the string
is broken up in to individual characters.

For the fix, if we get a KeyError exception, treat request.drive as
a string and pull the disk from diskset.disks with request.drive as
the key.

Does it make more sense to instead go through and ensure request.drive
is always a list?  And is this new somehow?

It started showing up when I moved in the new pyparted. I suppose it does make more sense to always ensure request.drive is a list, but I was looking for the easier fix since this storage code hopefully won't live much longer.

Also, it looks like you've got some other changes mixed in here

Eh? It's all related to this KeyError thing. I did create some functions that were the for loop body blocks before expanding it to a try/except. I made functions for the body blocks so I wouldn't have to copy and paste a huge chunk of code.

--
David Cantrell <dcantrell@xxxxxxxxxx>
Red Hat / Honolulu, HI

_______________________________________________
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