vmstate-static-checker fix for 4.2

-----BEGIN PGP SIGNATURE-----
 
 iQJIBAABCAAyFiEEWjIv1avE09usz9GqKAeTb5hNxaYFAl3cWusUHGVoYWJrb3N0
 QHJlZGhhdC5jb20ACgkQKAeTb5hNxaZtlg//beEZ0+koq4Ik/0brgL+HfD+2duPc
 c2BbHO54p3aCK5JWNz4UBom9KfPYTwRPtJm9t33a4N0OlX9jdKqpblwN9oa1fYbP
 0OSDjGTDpsJVnM1g+UDgmzirS6rGQSq84msVJJfyyy688wQeJeSPApGaPFwwjwUa
 MIv1lJH8bOfHmFZqN7lXggrPz+vHR6v6bq39ZlTFKMkeX3wMhCLwMKiRG1xLOqCe
 0wKPpWxl3OiRNAjIt8gNnNBe46jIPUxu66UuYna2AHwKurCESFH0K4b7KC9t2hMT
 xN/TaIvL1J9Hiwy91Im6KDoD4Qizcm8oN3SDNi9tAFY2FypKiGmf8XBRVx1WI9Lw
 nJYP8i2Eb22o83sySA3Rg54DVMuIJK4iraOUYxY/l34aWeSoTo3uklrs4N5Pxx59
 T1sYuMdXyJPZXPNd1C3rDKTV8ZkKOlY+AX2A+rQnzeWcX6ACRMm+fUakSLXOomoR
 brEsslHWK/fO8tNLsVgz97kNfCikiA4xftJBCtRFLmI4rwhBIn0sf5WveUTsFNeL
 LCOxe9HfJIGqhhUvYjjfilK6NognyAo5hOBEq21z+xdiYvz8tIwBkmNmDsrfBsyT
 40bwdzz/8hcP1CKQooVryambr3qSwPtl95a3CdkPSZAlPrgEZShvuj/V45igr46w
 Sm/owD55ZPJs6z4=
 =fUWE
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/ehabkost/tags/python-next-pull-request' into staging

vmstate-static-checker fix for 4.2

# gpg: Signature made Mon 25 Nov 2019 22:51:23 GMT
# gpg:                using RSA key 5A322FD5ABC4D3DBACCFD1AA2807936F984DC5A6
# gpg:                issuer "ehabkost@redhat.com"
# gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" [full]
# Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF  D1AA 2807 936F 984D C5A6

* remotes/ehabkost/tags/python-next-pull-request:
  vmstate-static-checker: Fix for current python

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2019-11-26 15:10:45 +00:00
commit 3c48f6daed

View File

@ -375,9 +375,11 @@ def main():
help_text = "Parse JSON-formatted vmstate dumps from QEMU in files SRC and DEST. Checks whether migration from SRC to DEST QEMU versions would break based on the VMSTATE information contained within the JSON outputs. The JSON output is created from a QEMU invocation with the -dump-vmstate parameter and a filename argument to it. Other parameters to QEMU do not matter, except the -M (machine type) parameter."
parser = argparse.ArgumentParser(description=help_text)
parser.add_argument('-s', '--src', type=file, required=True,
parser.add_argument('-s', '--src', type=argparse.FileType('r'),
required=True,
help='json dump from src qemu')
parser.add_argument('-d', '--dest', type=file, required=True,
parser.add_argument('-d', '--dest', type=argparse.FileType('r'),
required=True,
help='json dump from dest qemu')
parser.add_argument('--reverse', required=False, default=False,
action='store_true',