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: v14.0.1~929^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F22870%2Fhead;p=ceph.git mgr: replace iteritems with six.iteritems (mgr_module.py) Fixes: http://tracker.ceph.com/issues/24779 Signed-off-by: Nathan Cutler --- diff --git a/src/pybind/mgr/mgr_module.py b/src/pybind/mgr/mgr_module.py index 82480385f1b9..396fbafe35b3 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):