From 8cdb00e413cc9f82d01b0b20f38c490e7a10e187 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sun, 28 Jun 2020 20:52:35 +0800 Subject: [PATCH] pybind/mgr/mgr_module: drop py2 support Signed-off-by: Kefu Chai --- src/pybind/mgr/mgr_module.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pybind/mgr/mgr_module.py b/src/pybind/mgr/mgr_module.py index 49c94826b3a..8dedef44d95 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): -- 2.39.5