qemu-trivial
[Top][All Lists]
Advanced

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

Re: [PATCH 1/1] analyze-migration.py: fix read_migration_debug_json() re


From: Алексей Кириллов
Subject: Re: [PATCH 1/1] analyze-migration.py: fix read_migration_debug_json() return type
Date: Mon, 27 Jul 2020 12:37:44 +0300

Ping
 
15.07.2020, 19:06, "Philippe Mathieu-Daudé" <philmd@redhat.com>:

Cc'ing Eduardo/Cleber.

On 7/15/20 5:21 PM, Alexey Kirillov wrote:

 Since we use result of read_migration_debug_json() as JSON formatted string,
 we must provide proper type. Before Python 3.6 json.loads() method
 support only str typed input.
 
 Signed-off-by: Alexey Kirillov <lekiravi@yandex-team.ru>
 ---
  scripts/analyze-migration.py | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/scripts/analyze-migration.py b/scripts/analyze-migration.py
 index 95838cbff3..c5f06482cf 100755
 --- a/scripts/analyze-migration.py
 +++ b/scripts/analyze-migration.py
 @@ -97,7 +97,7 @@ class MigrationFile(object):
          # Seek back to where we were at the beginning
          self.file.seek(entrypos, 0)
  
 - return data[jsonpos:jsonpos + jsonlen]
 + return data[jsonpos:jsonpos + jsonlen].decode("utf-8")
  
      def close(self):
          self.file.close()
 

 

 
 
-- 
Alexey Kirillov
 

reply via email to

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