]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/progress: pass a str as the value of option to set_module_option()
authorKefu Chai <kchai@redhat.com>
Sun, 17 Jan 2021 08:02:30 +0000 (16:02 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 26 Jan 2021 10:01:59 +0000 (18:01 +0800)
MgrModule.set_module_option() only accepts str or None as its second
parameter.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/pybind/mgr/progress/module.py

index a708eab5ffb00ec018271e6ff1bb51c0b4d1cc05..d9935c4581808cd4b3fbe5db1e436c9bec5f8833 100644 (file)
@@ -801,10 +801,10 @@ class Module(MgrModule):
             self.log.warning("fail: ev {0} does not exist".format(ev_id))
 
     def on(self):
-        self.set_module_option('enabled', True)
+        self.set_module_option('enabled', "true")
 
     def off(self):
-        self.set_module_option('enabled', False)
+        self.set_module_option('enabled', "false")
 
     def _handle_ls(self):
         if len(self._events) or len(self._completed_events):