summary refs log tree commit diff stats
path: root/fsdev/p9array.h
diff options
context:
space:
mode:
authorLaurent Vivier <lvivier@redhat.com>2021-10-15 15:16:45 +0200
committerLaurent Vivier <laurent@vivier.eu>2021-10-23 20:28:56 +0200
commit2c92be50bcfa8b7529a39fc99078ef14dcfc71aa (patch)
treeee9c027a5b71ca0b304da7bd5707d141c6c9c715 /fsdev/p9array.h
parentf98d372aeff5109d2b5a3b858a51347e0ccd36b1 (diff)
downloadfocaccia-qemu-2c92be50bcfa8b7529a39fc99078ef14dcfc71aa.tar.gz
focaccia-qemu-2c92be50bcfa8b7529a39fc99078ef14dcfc71aa.zip
analyze-migration.py: fix extract contents ('-x') errors
When we try to use 'analyze-migration.py -x' with python3,
we have the following errors:

  Traceback (most recent call last):
    File "scripts/analyze-migration.py", line 593, in <module>
      f.write(jsonenc.encode(dump.vmsd_desc))
  TypeError: a bytes-like object is required, not 'str'

  Traceback (most recent call last):
    File "scripts/analyze-migration.py", line 601, in <module>
      f.write(jsonenc.encode(dict))
  TypeError: a bytes-like object is required, not 'str'

This happens because the file 'f' is open in binary mode while
jsonenc.encode() returns a string.

The results are human-readable files, 'desc.json' and 'state.json',
so there is no reason to use the binary mode.

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20211015131645.501281-3-lvivier@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'fsdev/p9array.h')
0 files changed, 0 insertions, 0 deletions