ia64/xen-unstable

changeset 13809:1c7efb60176c

[PYGRUB] Invoke pygrub with TERM=vt100
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
author Tim Deegan <Tim.Deegan@xensource.com>
date Thu Feb 01 15:03:37 2007 +0000 (2007-02-01)
parents 6e81102d29be
children d34d43fb88ae
files tools/pygrub/src/pygrub tools/python/xen/xend/XendBootloader.py
line diff
     1.1 --- a/tools/pygrub/src/pygrub	Thu Feb 01 13:15:03 2007 +0000
     1.2 +++ b/tools/pygrub/src/pygrub	Thu Feb 01 15:03:37 2007 +0000
     1.3 @@ -197,7 +197,10 @@ class Grub:
     1.4              self.screen = curses.initscr()
     1.5              self.screen.timeout(1000)
     1.6              if hasattr(curses, 'use_default_colors'):
     1.7 -                curses.use_default_colors()
     1.8 +                try:
     1.9 +                    curses.use_default_colors()
    1.10 +                except:
    1.11 +                    pass # Not important if we can't use colour
    1.12              enable_cursor(False)
    1.13              self.entry_win = curses.newwin(10, 74, 2, 1)
    1.14              self.text_win = curses.newwin(10, 70, 12, 5)
     2.1 --- a/tools/python/xen/xend/XendBootloader.py	Thu Feb 01 13:15:03 2007 +0000
     2.2 +++ b/tools/python/xen/xend/XendBootloader.py	Thu Feb 01 15:03:37 2007 +0000
     2.3 @@ -97,7 +97,9 @@ def bootloader(blexec, disk, dom, quiet 
     2.4  
     2.5          try:
     2.6              log.debug("Launching bootloader as %s." % str(args))
     2.7 -            os.execvp(args[0], args)
     2.8 +            env = os.environ.copy()
     2.9 +            env['TERM'] = 'vt100'
    2.10 +            os.execvpe(args[0], args, env)
    2.11          except OSError, e:
    2.12              print e
    2.13              pass