Skip to content

Commit

Permalink
tools/pygrub: Failing to set value to 0 in Grub2ConfigFile
Browse files Browse the repository at this point in the history
In Grub2ConfigFile the code to handle ${saved_entry} and ${next_entry}
sets arg = "0" but this now does nothing following c/s d1b93ea
"tools/pygrub: Make pygrub understand default entry in string format"
which replaced arg.strip() with arg_strip in the following line.  This
patch restores the previous behaviour.

Signed-off-by: Michael Young <[email protected]>
Reviewed-by: Andrew Cooper <[email protected]>
  • Loading branch information
mayoung authored and andyhhp committed Aug 14, 2019
1 parent 435e985 commit e536834
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/pygrub/src/GrubConf.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ def parse(self, buf = None):
arg_strip = arg.strip()
if arg_strip == "${saved_entry}" or arg_strip == "${next_entry}":
logging.warning("grub2's saved_entry/next_entry not supported")
arg = "0"
arg_strip = "0"
setattr(self, self.commands[com], arg_strip)
else:
logging.info("Ignored directive %s" %(com,))
Expand Down

0 comments on commit e536834

Please sign in to comment.