From: Sage Weil Date: Wed, 26 May 2021 17:45:53 +0000 (-0400) Subject: mgr/nfs/export_utils: include false but non-None items in config X-Git-Tag: v17.1.0~1551^2~56 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fe1155f0151e4619e13eb3df49dc3dd54eb80511;p=ceph.git mgr/nfs/export_utils: include false but non-None items in config For example, attr_expiration_time = 0 is the default. Include this since it is not None. Signed-off-by: Sage Weil --- diff --git a/src/pybind/mgr/nfs/export_utils.py b/src/pybind/mgr/nfs/export_utils.py index 2cfe00f8220b..593108c63713 100644 --- a/src/pybind/mgr/nfs/export_utils.py +++ b/src/pybind/mgr/nfs/export_utils.py @@ -132,7 +132,7 @@ class GaneshaConfParser: elif key == '_blocks_': for blo in val: conf_str += GaneshaConfParser.write_block(blo, depth) - elif val: + elif val is not None: conf_str += GaneshaConfParser._indentation(depth) conf_str += '{} = {};\n'.format(key, format_val(key, val)) return conf_str