From: Keir Fraser Date: Thu, 15 Apr 2010 16:36:55 +0000 (+0100) Subject: pygrub: Fix Grub2 support for Ubuntu 10.04 X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~12354 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=757907af26fda8df608b58cbb3fede8eb03434c0;p=xen.git pygrub: Fix Grub2 support for Ubuntu 10.04 Due to changes in grub2, menu entry titles now have single quote around them rather than double quotes, but the memtest entries still are using double quotes, so we need to catch both. Signed-off-by: David Markey --- diff --git a/tools/pygrub/src/GrubConf.py b/tools/pygrub/src/GrubConf.py index c03f374156..51d0c17a4e 100644 --- a/tools/pygrub/src/GrubConf.py +++ b/tools/pygrub/src/GrubConf.py @@ -379,7 +379,7 @@ class Grub2ConfigFile(_GrubConfigFile): continue # new image - title_match = re.match('^menuentry "(.*)" (.*){', l) + title_match = re.match('^menuentry ["\'](.*)["\'] (.*){', l) if title_match: if img is not None: raise RuntimeError, "syntax error: cannot nest menuentry (%d %s)" % (len(img),img)