pygrub: if default entry is "saved" then use first entry.

pygrub doesn't support the "savedefault" command and will error out if
menu.lst uses the "default saved" directive. We might as well start on
the first entry in this case instead of failing.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
Keir Fraser committed 2009-11-23 07:17:10 +00:00
1 parent adaedafa56
commit 758a4a6431
1 file changed
+1 -1
+1 -1
View File
@@ -258,7 +258,7 @@ class GrubConfigFile(object):
return self._default
def _set_default(self, val):
if val == "saved":
self._default = -1
self._default = 0
else:
self._default = int(val)
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.