From b23177b1772ac1fa61b90efaf2380af9b7fa3e9a Mon Sep 17 00:00:00 2001 From: Michael Young Date: Tue, 25 Oct 2011 19:21:05 +0100 Subject: 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 --- tools/pygrub/src/GrubConf.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tools/pygrub') 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,)) -- cgit v1.2.3