# HG changeset patch # User Michael Young # Date 1319566865 -3600 # Node ID 979bc34d0ad0369e42c70f66a39952e4b6b9b613 # Parent 152049468175f29a3792b3b60e09a841f9cd2c21 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 Index: xen-4.1.2-testing/tools/pygrub/src/GrubConf.py =================================================================== --- xen-4.1.2-testing.orig/tools/pygrub/src/GrubConf.py +++ xen-4.1.2-testing/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,))