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

vjasani 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 8b1ff4802e AMBARI-25961 : Fix for IndexError in ambari-server.py 
(#3714)
8b1ff4802e is described below

commit 8b1ff4802e16084515911e0ae88eca9fb73e7f10
Author: Himanshu Maurya <54660538+himanshumaurya09...@users.noreply.github.com>
AuthorDate: Mon Jul 24 00:52:45 2023 +0530

    AMBARI-25961 : Fix for IndexError in ambari-server.py (#3714)
---
 ambari-server/src/main/python/ambari-server.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ambari-server/src/main/python/ambari-server.py 
b/ambari-server/src/main/python/ambari-server.py
index 7cb7a39ca8..d7927dab52 100755
--- a/ambari-server/src/main/python/ambari-server.py
+++ b/ambari-server/src/main/python/ambari-server.py
@@ -1027,6 +1027,9 @@ def main(options, args, parser):
 
 def mainBody():
   parser = optparse.OptionParser(usage="usage: %prog action [options]",)
+  if len(sys.argv) < 2:
+        print parser.print_help()
+        parser.error("No action entered")
   action = sys.argv[1]
 
   init_action_parser(action, parser)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@ambari.apache.org
For additional commands, e-mail: commits-h...@ambari.apache.org

Reply via email to