From: Nathan Cutler Date: Thu, 5 Jul 2018 15:34:51 +0000 (+0200) Subject: mgr: replace iteritems with six.iteritems (mgr_module.py) X-Git-Tag: v13.2.1~87^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=94fd03d803cfc837a6fdf3676f0a3df5f990a1ee;p=ceph.git mgr: replace iteritems with six.iteritems (mgr_module.py) Fixes: http://tracker.ceph.com/issues/24779 Signed-off-by: Nathan Cutler (cherry picked from commit 093562f6de706cb810fef5b0a297fb2422c65c78) --- diff --git a/src/pybind/mgr/mgr_module.py b/src/pybind/mgr/mgr_module.py index 1db2e71a425e..f1e5c127f5e3 100644 --- a/src/pybind/mgr/mgr_module.py +++ b/src/pybind/mgr/mgr_module.py @@ -3,6 +3,7 @@ import ceph_module # noqa import json import logging +import six import threading from collections import defaultdict import rados @@ -141,7 +142,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', {})) } @staticmethod def have_default_choose_args(dump):