]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr: replace iteritems with six.iteritems (mgr_module.py)
authorNathan Cutler <ncutler@suse.com>
Thu, 5 Jul 2018 15:34:51 +0000 (17:34 +0200)
committerNathan Cutler <ncutler@suse.com>
Fri, 6 Jul 2018 21:34:58 +0000 (23:34 +0200)
Fixes: http://tracker.ceph.com/issues/24779
Signed-off-by: Nathan Cutler <ncutler@suse.com>
(cherry picked from commit 093562f6de706cb810fef5b0a297fb2422c65c78)

src/pybind/mgr/mgr_module.py

index 230d6f20b928d3d7ad9a86e45994af5f214480a7..7e2e340687451617d4c9654b52eb8c29c8da78d6 100644 (file)
@@ -6,6 +6,7 @@ import ceph_module  # noqa
 
 import json
 import logging
+import six
 import threading
 from collections import defaultdict
 
@@ -142,7 +143,7 @@ class CRUSHMap(ceph_module.BasePyCRUSH):
 
     def get_take_weight_osd_map(self, root):
         uglymap = self._get_take_weight_osd_map(root)
-        return { int(k): v for k, v in uglymap.get('weights', {}).iteritems() }
+        return { int(k): v for k, v in six.iteritems(uglymap.get('weights', {})) }
 
 class MgrStandbyModule(ceph_module.BaseMgrStandbyModule):
     """