From 1c1aa0c45f82b395f4c03709cf2de208b65c534b Mon Sep 17 00:00:00 2001 From: Michael Young Date: Tue, 10 Jan 2012 17:08:27 +0000 Subject: [PATCH] pyrgrub: cope with configurations with set default="${saved_entry}" line Fedora 16 grub2 configuration file can have lines like set default="${saved_entry}" and a string containing an integer is expected Signed-off-by: Michael Young Acked-by: Ian Campbell Committed-by: Ian Jackson xen-unstable changeset: 24002:979bc34d0ad0 Backport-requested-by: Pasi Karkkainen Committed-by: Ian Jackson --- tools/pygrub/src/GrubConf.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/pygrub/src/GrubConf.py b/tools/pygrub/src/GrubConf.py index a31e30a46f..c4f543d196 100644 --- a/tools/pygrub/src/GrubConf.py +++ b/tools/pygrub/src/GrubConf.py @@ -425,6 +425,8 @@ class Grub2ConfigFile(_GrubConfigFile): if self.commands.has_key(com): if self.commands[com] is not None: + if arg.strip() == "${saved_entry}": + arg = "0" setattr(self, self.commands[com], arg.strip()) else: logging.info("Ignored directive %s" %(com,)) -- 2.39.5