From: Kefu Chai Date: Sun, 28 Jun 2020 12:52:35 +0000 (+0800) Subject: pybind/mgr/mgr_module: drop py2 support X-Git-Tag: v16.1.0~1844^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8cdb00e413cc9f82d01b0b20f38c490e7a10e187;p=ceph.git pybind/mgr/mgr_module: drop py2 support Signed-off-by: Kefu Chai --- diff --git a/src/pybind/mgr/mgr_module.py b/src/pybind/mgr/mgr_module.py index 49c94826b3a8..8dedef44d95e 100644 --- a/src/pybind/mgr/mgr_module.py +++ b/src/pybind/mgr/mgr_module.py @@ -8,7 +8,6 @@ except ImportError: import logging import errno import json -import six import threading from collections import defaultdict, namedtuple import rados @@ -197,7 +196,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 six.iteritems(uglymap.get('weights', {}))} + return {int(k): v for k, v in uglymap.get('weights', {}).items()} @staticmethod def have_default_choose_args(dump):