]> 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)
committerSebastian Wagner <sewagner@redhat.com>
Thu, 9 Sep 2021 14:17:45 +0000 (16:17 +0200)
For example, attr_expiration_time = 0 is the default. Include this since
it is not None.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit fe1155f0151e4619e13eb3df49dc3dd54eb80511)

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