From 6dc95544512362c202535139c323717ec867e20b Mon Sep 17 00:00:00 2001 From: Noah Watkins Date: Sat, 13 Oct 2018 09:05:06 -0700 Subject: [PATCH] mgr: python 3 compat fixes Signed-off-by: Noah Watkins --- src/pybind/mgr/balancer/module.py | 2 +- src/pybind/mgr/crash/module.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pybind/mgr/balancer/module.py b/src/pybind/mgr/balancer/module.py index ca090516c99..bacca719c35 100644 --- a/src/pybind/mgr/balancer/module.py +++ b/src/pybind/mgr/balancer/module.py @@ -296,7 +296,7 @@ class Module(MgrModule): self.log.warn("Handling command: '%s'" % str(command)) if command['prefix'] == 'balancer status': s = { - 'plans': self.plans.keys(), + 'plans': list(self.plans.keys()), 'active': self.active, 'mode': self.get_config('mode', default_mode), } diff --git a/src/pybind/mgr/crash/module.py b/src/pybind/mgr/crash/module.py index e6735b2c012..82ebc6dd23b 100644 --- a/src/pybind/mgr/crash/module.py +++ b/src/pybind/mgr/crash/module.py @@ -79,7 +79,7 @@ class Module(MgrModule): def do_ls(self, cmd, inbuf): keys = [] - for key in self.get_store_prefix('crash/').iterkeys(): + for key in six.iterkeys(self.get_store_prefix('crash/')): keys.append(key.replace('crash/', '')) return 0, '\n'.join(keys), '' -- 2.39.5