This is an automated email from the ASF dual-hosted git repository.

asnaik pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/branch-2.7 by this push:
     new 4140a03  [AMBARI-25184] configs.py: cannot set an empty property value 
(apappu) (#2914)
4140a03 is described below

commit 4140a034c015b878e92adb2dce552dbb246ddafc
Author: amarnathreddy pappu <apa...@hortonworks.com>
AuthorDate: Wed Apr 10 23:07:20 2019 -0700

    [AMBARI-25184] configs.py: cannot set an empty property value (apappu) 
(#2914)
---
 ambari-server/src/main/resources/scripts/configs.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ambari-server/src/main/resources/scripts/configs.py 
b/ambari-server/src/main/resources/scripts/configs.py
index 5ce7392..44be04b 100644
--- a/ambari-server/src/main/resources/scripts/configs.py
+++ b/ambari-server/src/main/resources/scripts/configs.py
@@ -349,7 +349,7 @@ def main():
   accessor = api_accessor(host, user, password, protocol, port, options.unsafe)
   if action == SET_ACTION:
 
-    if not options.file and (not options.key or not options.value):
+    if not options.file and (not options.key or options.value is None):
       parser.error("You should use option (-f) to set file where entire 
configurations are saved OR (-k) key and (-v) value for one property")
     if options.file:
       action_args = [options.file]

Reply via email to