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>
This commit is contained in:
Keir Fraser committed 2010-04-15 17:36:55 +01:00
1 parent a667809cd4
commit 757907af26
1 file changed
+1 -1
+1 -1
View File
@@ -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)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.