]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr: python 3 compat fixes 24565/head
authorNoah Watkins <noahwatkins@gmail.com>
Sat, 13 Oct 2018 16:05:06 +0000 (09:05 -0700)
committerNoah Watkins <noahwatkins@gmail.com>
Sat, 13 Oct 2018 16:05:06 +0000 (09:05 -0700)
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
src/pybind/mgr/balancer/module.py
src/pybind/mgr/crash/module.py

index ca090516c99df09e46a9415ff8ec5f284db1bc0c..bacca719c35a76bf335e8c5d4f511b485c41f9db 100644 (file)
@@ -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),
             }
index e6735b2c0123a2f1ac3999914544c891a1d9d54a..82ebc6dd23be7140d68953aaafdfe70723d808e6 100644 (file)
@@ -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), ''