[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] pygrub: fix non-interactive parsing of grub1 config files
From: David Scott <dave.scott@xxxxxxxxxxxxx> Since c/s d1b93ea2, the type of 'sel' now depends on whether pygrub is run interactively or not. In non-interactive / quiet mode it is a string; in interactive mode it is an integer. When 'sel' is used to index an array it must be used as an integer. Signed-off-by: David Scott <dave.scott@xxxxxxxxxx> --- tools/pygrub/src/pygrub | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/pygrub/src/pygrub b/tools/pygrub/src/pygrub index 2618e11..f167a51 100644 --- a/tools/pygrub/src/pygrub +++ b/tools/pygrub/src/pygrub @@ -630,7 +630,7 @@ def run_grub(file, entry, fs, cfg_args): sys.exit(1) try: - img = g.cf.images[sel] + img = g.cf.images[int(sel)] except IndexError: img = g.cf.images[0] -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |