]> Git Repo - qemu.git/commitdiff
vmstate-static-checker: Fix for current python
authorDr. David Alan Gilbert <[email protected]>
Thu, 21 Nov 2019 18:53:03 +0000 (18:53 +0000)
committerEduardo Habkost <[email protected]>
Mon, 25 Nov 2019 22:49:50 +0000 (19:49 -0300)
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 <[email protected]>
Message-Id: <20191121185303[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Cleber Rosa <[email protected]>
Signed-off-by: Eduardo Habkost <[email protected]>
scripts/vmstate-static-checker.py

index d3467288dcc5dd2f7274576262f7801e468faa72..f8b7b8f77252f2c03d6d7db9dc60ca0d6c618c59 100755 (executable)
@@ -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',
This page took 0.027233 seconds and 4 git commands to generate.