[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 0/4] More python fixes



On Mon, 1 Apr 2019, Wei Liu wrote:

> Wei Liu (4):
>  pygrub: fix message in grub parser
>  pygrub/grub: always use integer for default entry
>  pygrub: decode string in Python 3
>  tools/ocaml: make python scripts 2 and 3 compatible
>
> tools/ocaml/libs/xentoollog/genlevels.py |  5 ++++-
> tools/ocaml/libs/xl/genwrap.py           | 17 ++++++++++-------
> tools/pygrub/src/GrubConf.py             |  8 ++++++--
> tools/pygrub/src/pygrub                  |  5 ++++-
> 4 files changed, 24 insertions(+), 11 deletions(-)

There is a bit missing compared to my original patch which is to convert 
the string back to bytes for the final write out and avoid the error

Traceback (most recent call last):
   File "/tmp/xencode/usr/libexec/xen/bin/pygrub", line 967, in <module>
     os.write(fd, ostring)
TypeError: a bytes-like object is required, not 'str'

The attached patch works for me in a quick test on python3 though I 
haven't tested it on python2 yet.

        Michael Young

Attachment: python3.patch
Description: python3.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.