summaryrefslogtreecommitdiffstats
path: root/src/pybind/mgr/hello
diff options
context:
space:
mode:
authorSage Weil <sage@redhat.com>2020-01-21 17:43:04 +0100
committerSage Weil <sage@redhat.com>2020-01-21 17:44:45 +0100
commit5ace82e65c72847fb875fc01c419937a26a59d70 (patch)
treeb7f24098a2a4da62d72e84127cc73623b603a480 /src/pybind/mgr/hello
parentmgr/dashboard: Fix modals for Identifying Device and Editing O… (#32589) (diff)
downloadceph-5ace82e65c72847fb875fc01c419937a26a59d70.tar.xz
ceph-5ace82e65c72847fb875fc01c419937a26a59d70.zip
pybind/mgr/*: fix config_notify handling of default values
The default values are handled by mgr_module.py's _get_module_option(); the or here means that we break any non-true (0, false, none) value and override it with the default. https://tracker.ceph.com/issues/43746 Signed-off-by: Sage Weil <sage@redhat.com>
Diffstat (limited to 'src/pybind/mgr/hello')
-rw-r--r--src/pybind/mgr/hello/module.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pybind/mgr/hello/module.py b/src/pybind/mgr/hello/module.py
index 469173b21e9..b164dfb620d 100644
--- a/src/pybind/mgr/hello/module.py
+++ b/src/pybind/mgr/hello/module.py
@@ -83,7 +83,7 @@ class Hello(MgrModule):
for opt in self.MODULE_OPTIONS:
setattr(self,
opt['name'],
- self.get_module_option(opt['name']) or opt['default'])
+ self.get_module_option(opt['name']))
self.log.debug(' mgr option %s = %s',
opt['name'], getattr(self, opt['name']))
# Do the same for the native options.