From: Alfredo Deza Date: Mon, 12 Feb 2018 21:46:47 +0000 (-0500) Subject: ceph-volume configuration normalize underscore vs. whitespace named options X-Git-Tag: v13.0.2~255^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b80e3bf1175a65181d1f2ed38b6a416c6b730d82;p=ceph.git ceph-volume configuration normalize underscore vs. whitespace named options Signed-off-by: Alfredo Deza --- diff --git a/src/ceph-volume/ceph_volume/configuration.py b/src/ceph-volume/ceph_volume/configuration.py index f515b8c9eae..2b9cd9fdc7f 100644 --- a/src/ceph-volume/ceph_volume/configuration.py +++ b/src/ceph-volume/ceph_volume/configuration.py @@ -65,6 +65,11 @@ class Conf(configparser.SafeConfigParser): except (configparser.NoSectionError, configparser.NoOptionError): raise exceptions.ConfigurationKeyError('global', 'fsid') + def optionxform(self, s): + s = s.replace('_', ' ') + s = '_'.join(s.split()) + return s + def get_safe(self, section, key, default=None): """ Attempt to get a configuration value from a certain section