aboutsummaryrefslogtreecommitdiff
path: root/scripts/vmstate-static-checker.py
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dgilbert@redhat.com>2019-11-21 18:53:03 +0000
committerEduardo Habkost <ehabkost@redhat.com>2019-11-25 19:49:50 -0300
commite8d0ac5801edda91412e52fb82f291eed5171c2c (patch)
tree3a70127b301a2d4af4d32497b920d3316b27f08b /scripts/vmstate-static-checker.py
parent65e05c82bdc6d348155e301c9d87dba7a08a5701 (diff)
vmstate-static-checker: Fix for current python
Python 3.7.5 on f31 doesn't seem to like the old type=file syntax on argparse. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20191121185303.51685-1-dgilbert@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Cleber Rosa <crosa@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'scripts/vmstate-static-checker.py')
-rwxr-xr-xscripts/vmstate-static-checker.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/vmstate-static-checker.py b/scripts/vmstate-static-checker.py
index d3467288dc..f8b7b8f772 100755
--- a/scripts/vmstate-static-checker.py
+++ b/scripts/vmstate-static-checker.py
@@ -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',