Repository: incubator-ranger
Updated Branches:
  refs/heads/master 0336e2b2c -> f72e949eb


RANGER-481: credential helper script should not exit if JAVA_HOME is not defined


Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/f72e949e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/f72e949e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/f72e949e

Branch: refs/heads/master
Commit: f72e949ebdbac471ad858f74839f5341bbe43275
Parents: 0336e2b
Author: Velmurugan Periasamy <[email protected]>
Authored: Sun May 17 15:29:22 2015 -0400
Committer: Velmurugan Periasamy <[email protected]>
Committed: Sun May 17 15:29:22 2015 -0400

----------------------------------------------------------------------
 security-admin/scripts/ranger_credential_helper.py | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/f72e949e/security-admin/scripts/ranger_credential_helper.py
----------------------------------------------------------------------
diff --git a/security-admin/scripts/ranger_credential_helper.py 
b/security-admin/scripts/ranger_credential_helper.py
index bc4dbb7..940dbf1 100644
--- a/security-admin/scripts/ranger_credential_helper.py
+++ b/security-admin/scripts/ranger_credential_helper.py
@@ -20,14 +20,12 @@ from subprocess import  Popen,PIPE
 from optparse import OptionParser
 
 if os.getenv('JAVA_HOME') is None:
-       print "[E] ---------- JAVA_HOME environment property not defined, 
aborting installation. ----------"
-       sys.exit(1)
-
-JAVA_BIN=os.path.join(os.getenv('JAVA_HOME'),'bin','java')
+       print "[W] ---------- JAVA_HOME environment property not defined, using 
java in path. ----------"
+       JAVA_BIN='java'
+else:
+       JAVA_BIN=os.path.join(os.getenv('JAVA_HOME'),'bin','java')
 print "Using Java:" + str(JAVA_BIN)
 
-
-
 def main():
 
        parser = OptionParser()

Reply via email to