]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks: replace iterkeys() with keys() in Python 3 43463/head
authorDai Zhiwei <daizhiwei3@huawei.com>
Fri, 8 Oct 2021 06:26:43 +0000 (14:26 +0800)
committerKefu Chai <tchaikov@gmail.com>
Sat, 9 Oct 2021 15:10:03 +0000 (23:10 +0800)
Python 2.7 reached the end of its lifetime, the pr fixes teuthology task
error in Python 3.x

Fixes: https://tracker.ceph.com/issues/52878
Signed-off-by: Dai Zhiwei <daizhiwei3@huawei.com>
qa/tasks/netsplit.py

index b6614dc5061b4a1af8ed87d43321d07788c699dd..0a9484a89a5c08b6d529460eeac745646c31ff2b 100644 (file)
@@ -35,8 +35,8 @@ def disconnect(ctx, config):
     (ip1, _) = get_ip_and_ports(ctx, config[0])
     (ip2, _) = get_ip_and_ports(ctx, config[1])
 
-    (host1,) = ctx.cluster.only(config[0]).remotes.iterkeys()
-    (host2,) = ctx.cluster.only(config[1]).remotes.iterkeys()
+    (host1,) = ctx.cluster.only(config[0]).remotes.keys()
+    (host2,) = ctx.cluster.only(config[1]).remotes.keys()
     assert host1 is not None
     assert host2 is not None
 
@@ -58,8 +58,8 @@ def reconnect(ctx, config):
     (ip1, _) = get_ip_and_ports(ctx, config[0])
     (ip2, _) = get_ip_and_ports(ctx, config[1])
 
-    (host1,) = ctx.cluster.only(config[0]).remotes.iterkeys()
-    (host2,) = ctx.cluster.only(config[1]).remotes.iterkeys()
+    (host1,) = ctx.cluster.only(config[0]).remotes.keys()
+    (host2,) = ctx.cluster.only(config[1]).remotes.keys()
     assert host1 is not None
     assert host2 is not None