From: Noah Watkins Date: Sat, 13 Oct 2018 16:05:06 +0000 (-0700) Subject: mgr: python 3 compat fixes X-Git-Tag: v14.0.1~16^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F24565%2Fhead;p=ceph.git mgr: python 3 compat fixes Signed-off-by: Noah Watkins --- diff --git a/src/pybind/mgr/balancer/module.py b/src/pybind/mgr/balancer/module.py index ca090516c99d..bacca719c35a 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 e6735b2c0123..82ebc6dd23be 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), ''