From: Kefu Chai Date: Sun, 28 Jun 2020 12:52:25 +0000 (+0800) Subject: pybind/mgr/insights: drop py2 support X-Git-Tag: wip-pdonnell-testing-20200918.022351~781^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6bdb280954bda42cc8de37165a368cc30450f858;p=ceph-ci.git pybind/mgr/insights: drop py2 support Signed-off-by: Kefu Chai --- diff --git a/src/pybind/mgr/insights/health.py b/src/pybind/mgr/insights/health.py index 5235ca849c1..48e5c37f41b 100644 --- a/src/pybind/mgr/insights/health.py +++ b/src/pybind/mgr/insights/health.py @@ -1,5 +1,4 @@ import json -import six from collections import defaultdict import datetime @@ -44,7 +43,7 @@ class HealthCheckAccumulator(object): """ changed = False - for check, info in six.iteritems(checks): + for check, info in checks.items(): # only keep the icky stuff severity = info["severity"] diff --git a/src/pybind/mgr/insights/module.py b/src/pybind/mgr/insights/module.py index a640d85b746..001bfb62061 100644 --- a/src/pybind/mgr/insights/module.py +++ b/src/pybind/mgr/insights/module.py @@ -2,7 +2,7 @@ import datetime import json import re import threading -import six + from mgr_module import MgrModule, CommandResult from . import health as health_util @@ -121,7 +121,7 @@ class Module(MgrModule): """Filter hourly health reports timestamp""" matches = filter( lambda t: f(health_util.HealthHistorySlot.key_to_time(t[0])), - six.iteritems(self.get_store_prefix(health_util.HEALTH_HISTORY_KEY_PREFIX))) + self.get_store_prefix(health_util.HEALTH_HISTORY_KEY_PREFIX).items()) return map(lambda t: t[0], matches) def _health_prune_history(self, hours): @@ -171,7 +171,7 @@ class Module(MgrModule): "major": m.group("major"), "minor": m.group("minor") } - return { k:int(v) for k,v in six.iteritems(ver) } + return { k:int(v) for k,v in ver.items() } def _crash_history(self, hours): """