]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
pybind/mgr/mgr_module: normalize defaults to str when type is missing
authorSage Weil <sage@redhat.com>
Wed, 19 Dec 2018 22:59:09 +0000 (16:59 -0600)
committerSage Weil <sage@redhat.com>
Fri, 21 Dec 2018 04:11:40 +0000 (22:11 -0600)
commit0228bd79226c862e0f71d73f808cffe17d8786f6
tree5f90454d65d589ba7ad7d336ff1447a04db4dff6
parent3ad7ac259a4b23ca8bf3eb60fa5b00ddcc026abd
pybind/mgr/mgr_module: normalize defaults to str when type is missing

If the module doesn't specify a type for the option, it is probably
an older module.  Make sure that the default value we provide is normalized
to a string, just in case the module declares something like

  {
     'name': 'my_option',
     'default': True,
  }

where the default is *not* a string, but an user-set value coming from
the config infrastructure would be a string.

Signed-off-by: Sage Weil <sage@redhat.com>
src/pybind/mgr/mgr_module.py