pygrub: make python scripts work with 2.6 and up
authorWei Liu <wei.liu2@citrix.com>
Thu, 7 Mar 2019 12:45:47 +0000 (12:45 +0000)
committerWei Liu <wei.liu2@citrix.com>
Tue, 12 Mar 2019 14:24:53 +0000 (14:24 +0000)
commit0aabd89dcfee9ee2a6caaa2ec7a475daf5cada53
treefa958faa27678b91f0e296914f6664c89d2c1783
parent660d2dd863802ef464c90b32f187cb65861f8185
pygrub: make python scripts work with 2.6 and up

Run 2to3 and pick the sensible suggestions.

Import print_function and absolute_import so 2.6 can work.

There has never been a curses.wrapper module according to 2.x and 3.x
doc, only a function, so "import curses.wrapper" is not correct. It
happened to work because 2.x implemented a (undocumented) module.

We only need to import curses to make curses.wrapper available to
pygrub.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/pygrub/src/ExtLinuxConf.py
tools/pygrub/src/GrubConf.py
tools/pygrub/src/LiloConf.py
tools/pygrub/src/pygrub