ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject ranger git commit: RANGER-1290:rebuild patch according to Colm O's review
Date Mon, 06 Feb 2017 09:40:14 GMT
Repository: ranger
Updated Branches:
  refs/heads/master d55fad423 -> 49af166e2


RANGER-1290:rebuild patch according to Colm O's review

Signed-off-by: Colm O hEigeartaigh <coheigea@apache.org>


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

Branch: refs/heads/master
Commit: 49af166e2a9427480c62d97d85810fc9119d4d7e
Parents: d55fad4
Author: zhangqiang2 <zhangqiang2@zte.com.cn>
Authored: Thu Jan 19 23:19:44 2017 +0800
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Mon Feb 6 09:37:33 2017 +0000

----------------------------------------------------------------------
 security-admin/scripts/dba_script.py | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ranger/blob/49af166e/security-admin/scripts/dba_script.py
----------------------------------------------------------------------
diff --git a/security-admin/scripts/dba_script.py b/security-admin/scripts/dba_script.py
index 4fe7a58..2c69157 100644
--- a/security-admin/scripts/dba_script.py
+++ b/security-admin/scripts/dba_script.py
@@ -68,10 +68,14 @@ def populate_global_dict():
 	elif os_name == "WINDOWS":
 		read_config_file = open(os.path.join(RANGER_ADMIN_HOME,'bin','install_config.properties'))
 		library_path = os.path.join(RANGER_ADMIN_HOME,"cred","lib","*")
-	for each_line in read_config_file.read().split('\n') :
-		if len(each_line) == 0 : continue
+	for cireach_line in read_config_file.read().split('\n') :
+		each_line = cireach_line.strip()
+		if len(each_line) == 0:
+			continue
+		elif each_line[0] == "#":
+			continue
 		if re.search('=', each_line):
-			key , value = each_line.strip().split("=",1)
+			key , value = each_line.split("=",1)
 			key = key.strip()
 			if 'PASSWORD' in key:
 				jceks_file_path = os.path.join(RANGER_ADMIN_HOME, 'jceks','ranger_db.jceks')


Mime
View raw message