]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/cephfs/cephfs_test_case: switch 'dict_keys' object to list
authorXiubo Li <xiubli@redhat.com>
Thu, 23 Apr 2020 13:23:31 +0000 (09:23 -0400)
committerKefu Chai <kchai@redhat.com>
Sun, 14 Jun 2020 08:34:52 +0000 (16:34 +0800)
Fix the "TypeError: 'dict_keys' object does not support indexing" under
py3.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit 666974e0a663aba6aff37cf78728c44b0e3a08c1)

qa/tasks/cephfs/cephfs_test_case.py

index 1286468b4ab20d609f82f075118efe7ab29bf86c..fabef9b305ecf263be9a094e1b49b2e660b4b4c9 100644 (file)
@@ -162,7 +162,7 @@ class CephFSTestCase(CephTestCase):
         # Load an config settings of interest
         for setting in self.LOAD_SETTINGS:
             setattr(self, setting, float(self.fs.mds_asok(
-                ['config', 'get', setting], self.mds_cluster.mds_ids[0]
+                ['config', 'get', setting], list(self.mds_cluster.mds_ids)[0]
             )[setting]))
 
         self.configs_set = set()