Skip to content

Commit

Permalink
pyrgrub: cope with configurations with set default="${saved_entry}" line
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Ian Campbell <[email protected]>
Committed-by: Ian Jackson <[email protected]>
  • Loading branch information
mayoung committed Oct 25, 2011
1 parent 0c385b2 commit b23177b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/pygrub/src/GrubConf.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,8 @@ def parse(self, buf = None):

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,))
Expand Down

0 comments on commit b23177b

Please sign in to comment.