criu/lib/py
Dmitry Safonov ca2d273781 lib/cli.py: Open out file as a binary
python3 fails to encode image with the following:

> [dima@Mindolluin criu]$ ./crit/crit encode -i tmp -o tmp.1
> Traceback (most recent call last):
>   File "/home/dima/src/criu/./crit/crit", line 6, in <module>
>     cli.main()
>   File "/home/dima/src/criu/crit/pycriu/cli.py", line 410, in main
>     opts["func"](opts)
>   File "/home/dima/src/criu/crit/pycriu/cli.py", line 50, in encode
>     pycriu.images.dump(img, outf(opts))
>   File "/home/dima/src/criu/crit/pycriu/images/images.py", line 617, in dump
>     f.write(struct.pack('i', magic.by_name['IMG_COMMON']))
> TypeError: write() argument must be str, not bytes

Opening the output file as binary seems to help.

Signed-off-by: Dmitry Safonov <dima@arista.com>
2021-03-09 22:22:15 -08:00
..
images lib/py: remove unused variable 2020-11-08 01:55:25 -08:00
.gitignore python lib: rename rpc.py to rpc_pb2.py 2016-10-10 12:49:28 +03:00
__init__.py crit: make crit python2/python3 compatible 2018-07-09 18:25:16 +03:00
cli.py lib/cli.py: Open out file as a binary 2021-03-09 22:22:15 -08:00
criu.py py: Fix tabs in code comments 2019-09-07 15:59:57 +03:00
Makefile build: Reused .FORCE from nmk 2017-11-23 20:23:14 +03:00