tools/pygrub: Failing to set value to 0 in Grub2ConfigFile

In Grub2ConfigFile the code to handle ${saved_entry} and ${next_entry}
sets arg = "0" but this now does nothing following c/s d1b93ea261
"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 <m.a.young@durham.ac.uk>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
Michael Young authored and Andrew Cooper committed 2019-08-14 12:15:17 +01:00
1 parent 435e985b10
commit e5368348d3
1 file changed
+1 -1
+1 -1
View File
@@ -440,7 +440,7 @@ class Grub2ConfigFile(_GrubConfigFile):
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,))
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.