qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH-for-4.2?] vmstate-static-checker: Fix for current python


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH-for-4.2?] vmstate-static-checker: Fix for current python
Date: Thu, 21 Nov 2019 19:58:54 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1

On 11/21/19 7:53 PM, Dr. David Alan Gilbert (git) wrote:
From: "Dr. David Alan Gilbert" <address@hidden>

Python 3.7.5 on f31 doesn't seem to like the old type=file syntax
on argparse.

Looks 4.2 worth to me.

Reviewed-by: Philippe Mathieu-Daudé <address@hidden>

Signed-off-by: Dr. David Alan Gilbert <address@hidden>
---
  scripts/vmstate-static-checker.py | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/scripts/vmstate-static-checker.py 
b/scripts/vmstate-static-checker.py
index 21dbdccf3e..9f912dd870 100755
--- a/scripts/vmstate-static-checker.py
+++ b/scripts/vmstate-static-checker.py
@@ -379,9 +379,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',





reply via email to

[Prev in Thread] Current Thread [Next in Thread]