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