diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2018-06-08 09:29:46 -0300 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2018-06-08 14:39:24 -0300 |
commit | d7a4228ebb0150e4c97a19077f3fac81d843e2c3 (patch) | |
tree | 020374f95228a5fbde5ed53ed03482b285d392e9 /tests/qemu-iotests/093 | |
parent | d24d523c14f5f519e04ea49bbe066323bb795879 (diff) |
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/093')
-rwxr-xr-x | tests/qemu-iotests/093 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/qemu-iotests/093 b/tests/qemu-iotests/093 index c3404a3171..68e344f8c1 100755 --- a/tests/qemu-iotests/093 +++ b/tests/qemu-iotests/093 @@ -237,7 +237,7 @@ class ThrottleTestGroupNames(iotests.QMPTestCase): if name: self.assertEqual(info["group"], name) else: - self.assertFalse(info.has_key('group')) + self.assertFalse('group' in info) return raise Exception("No group information found for '%s'" % device) |