]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/nfs/export_utils: include false but non-None items in config
authorSage Weil <sage@newdream.net>
Wed, 26 May 2021 17:45:53 +0000 (13:45 -0400)
committerSage Weil <sage@newdream.net>
Thu, 17 Jun 2021 20:18:06 +0000 (16:18 -0400)
For example, attr_expiration_time = 0 is the default. Include this since
it is not None.

Signed-off-by: Sage Weil <sage@newdream.net>
src/pybind/mgr/nfs/export_utils.py

index 2cfe00f8220b221602158a96220af5d7eddc113a..593108c63713ed4ed49e93054f0705dcb86bd9df 100644 (file)
@@ -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