debuggers.hg

changeset 21234:ffffddc4b1e0

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 <david.markey@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Apr 15 17:36:55 2010 +0100 (2010-04-15)
parents 3e56823eb209
children d18e6a6c618a
files tools/pygrub/src/GrubConf.py
line diff
     1.1 --- a/tools/pygrub/src/GrubConf.py	Thu Apr 15 17:36:16 2010 +0100
     1.2 +++ b/tools/pygrub/src/GrubConf.py	Thu Apr 15 17:36:55 2010 +0100
     1.3 @@ -379,7 +379,7 @@ class Grub2ConfigFile(_GrubConfigFile):
     1.4                  continue
     1.5  
     1.6              # new image
     1.7 -            title_match = re.match('^menuentry "(.*)" (.*){', l)
     1.8 +            title_match = re.match('^menuentry ["\'](.*)["\'] (.*){', l)
     1.9              if title_match:
    1.10                  if img is not None:
    1.11                      raise RuntimeError, "syntax error: cannot nest menuentry (%d %s)" % (len(img),img)