]> git.apps.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>
Wed, 3 Jun 2020 11:57:00 +0000 (19:57 +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 576e3d75332184a1dcae9abd1c98dc7f683ae1fa..83c0f62acb274dbfb0acbc8d2f9de4b0b3d80344 100644 (file)
@@ -163,7 +163,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()