|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [PATCH] Make PyGrub run first entry in grub config when
Michal Novotny writes ("[Xen-devel] [PATCH] Make PyGrub run first entry in grub
config when invalid default boot option provided"):
> - img = g.cf.images[sel]
> + try:
> + img = g.cf.images[sel]
> + except:
It is not correct to do this on all exceptions. (This is a common
mistake in Python.) I assume that in your error case the images array
doesn't have the relevant entry and that your code should read:
+ img = g.cf.images[sel]
+ except KeyError:
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|