From 51fc7a992204fb14aba2eb29d96c1785a79ca27f Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sun, 5 Apr 2020 20:54:02 +0800 Subject: [PATCH] qa/tasks/fs.py: use six.viewitems() in python3, dict.viewitems() is replaced with dict.items(). Signed-off-by: Kefu Chai --- qa/tasks/fs.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qa/tasks/fs.py b/qa/tasks/fs.py index 4b47e754bfa..ca84dc7a56d 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: -- 2.39.5