aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/096
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2018-06-08 09:29:46 -0300
committerEduardo Habkost <ehabkost@redhat.com>2018-06-08 14:39:24 -0300
commitd7a4228ebb0150e4c97a19077f3fac81d843e2c3 (patch)
tree020374f95228a5fbde5ed53ed03482b285d392e9 /tests/qemu-iotests/096
parentd24d523c14f5f519e04ea49bbe066323bb795879 (diff)
downloadqemu-d7a4228ebb0150e4c97a19077f3fac81d843e2c3.zip
qemu-d7a4228ebb0150e4c97a19077f3fac81d843e2c3.tar.gz
qemu-d7a4228ebb0150e4c97a19077f3fac81d843e2c3.tar.bz2
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>
Diffstat (limited to 'tests/qemu-iotests/096')
-rwxr-xr-xtests/qemu-iotests/0964
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/qemu-iotests/096 b/tests/qemu-iotests/096
index aeeb375..a694396 100755
--- a/tests/qemu-iotests/096
+++ b/tests/qemu-iotests/096
@@ -53,9 +53,9 @@ class TestLiveSnapshot(iotests.QMPTestCase):
self.assertEqual(r['iops'], self.iops)
self.assertEqual(r['iops_size'], self.iops_size)
else:
- self.assertFalse(r.has_key('group'))
+ self.assertFalse('group' in r)
self.assertEqual(r['iops'], 0)
- self.assertFalse(r.has_key('iops_size'))
+ self.assertFalse('iops_size' in r)
def testSnapshot(self):
self.checkConfig('base')