From 093562f6de706cb810fef5b0a297fb2422c65c78 Mon Sep 17 00:00:00 2001 From: Nathan Cutler Date: Thu, 5 Jul 2018 17:34:51 +0200 Subject: [PATCH] mgr: replace iteritems with six.iteritems (mgr_module.py) Fixes: http://tracker.ceph.com/issues/24779 Signed-off-by: Nathan Cutler --- src/pybind/mgr/mgr_module.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pybind/mgr/mgr_module.py b/src/pybind/mgr/mgr_module.py index 82480385f1b96..396fbafe35b3e 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): -- 2.39.5