From: Kefu Chai Date: Sun, 5 Apr 2020 12:54:02 +0000 (+0800) Subject: qa/tasks/fs.py: use six.viewitems() X-Git-Tag: v14.2.10~17^2~70 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=b8fea9b91c30731e114d1f6f6aa7a32d250b987c;p=ceph.git qa/tasks/fs.py: use six.viewitems() in python3, dict.viewitems() is replaced with dict.items(). Signed-off-by: Kefu Chai (cherry picked from commit 51fc7a992204fb14aba2eb29d96c1785a79ca27f) --- diff --git a/qa/tasks/fs.py b/qa/tasks/fs.py index 4b47e754bfa24..ca84dc7a56d77 100644 --- a/qa/tasks/fs.py +++ b/qa/tasks/fs.py @@ -4,6 +4,7 @@ CephFS sub-tasks. import logging import re +import six from tasks.cephfs.filesystem import Filesystem @@ -38,7 +39,7 @@ def clients_evicted(ctx, config): for rank in fs.get_ranks(status=status): ls = fs.rank_asok(['session', 'ls'], rank=rank['rank'], status=status) for session in ls: - for client, evicted in clients.viewitems(): + for client, evicted in six.viewitems(clients): mount = mounts.get(client) if mount is not None: global_id = mount.get_global_id() @@ -51,7 +52,7 @@ def clients_evicted(ctx, config): no_session = set(clients) - has_session should_assert = False - for client, evicted in clients.viewitems(): + for client, evicted in six.viewitems(clients): mount = mounts.get(client) if mount is not None: if evicted: