mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
python: futurize -f lib2to3.fixes.fix_has_key
Change "dict.has_key(key)" to "key in dict" This is necessary for Python 3 compatibility. Done using: $ py=$( (g grep -l -E '^#!.*python';find -name '*.py' -printf '%P\n';) | \ sort -u | grep -v README.sh4) $ futurize -w -f lib2to3.fixes.fix_has_key $py Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20180608122952.2009-5-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
d24d523c14
commit
d7a4228ebb
10 changed files with 12 additions and 12 deletions
|
@ -203,7 +203,7 @@ sector = "%d"
|
|||
if (self.accounted_ops(read = True, write = True, flush = True) != 0):
|
||||
self.assertLess(0, stats['idle_time_ns'])
|
||||
else:
|
||||
self.assertFalse(stats.has_key('idle_time_ns'))
|
||||
self.assertFalse('idle_time_ns' in stats)
|
||||
|
||||
# This test does not alter these, so they must be all 0
|
||||
self.assertEqual(0, stats['rd_merged'])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue