qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PULL 1/2] device-crash-test: Python 3 compatibility fix


From: Eduardo Habkost
Subject: [Qemu-devel] [PULL 1/2] device-crash-test: Python 3 compatibility fix
Date: Fri, 25 Jan 2019 12:06:09 -0200

From: Nisarg Shah <address@hidden>

Restrict whitelist entry stats in debug mode to be sorted only by
"count", since Python 3 does not implicitly support comparing
dictionaries.

Signed-off-by: Nisarg Shah <address@hidden>
Message-Id: <address@hidden>
[ehabkost: removed 2 unnecessary hunks from patch]
[ehabkost: edited commit message]
Signed-off-by: Eduardo Habkost <address@hidden>
---
 scripts/device-crash-test | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/device-crash-test b/scripts/device-crash-test
index 483dafb2fc..2a13fa4f84 100755
--- a/scripts/device-crash-test
+++ b/scripts/device-crash-test
@@ -557,7 +557,8 @@ def main():
         logger.info("Skipped %d test cases", skipped)
 
     if args.debug:
-        stats = sorted([(len(wl_stats.get(i, [])), wl) for i, wl in 
enumerate(ERROR_WHITELIST)])
+        stats = sorted([(len(wl_stats.get(i, [])), wl) for i, wl in
+                         enumerate(ERROR_WHITELIST)], key=lambda x: x[0])
         for count, wl in stats:
             dbg("whitelist entry stats: %d: %r", count, wl)
 
-- 
2.18.0.rc1.1.g3f1ff2140




reply via email to

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