You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by co...@apache.org on 2017/02/08 09:44:51 UTC

ranger git commit: RANGER-1356:The installer does not filter out comments lines for the configuration file when installing the Ranger UserSync Process and tagsync

Repository: ranger
Updated Branches:
  refs/heads/master 8a398878a -> 82189ab24


RANGER-1356:The installer does not filter out comments lines for the configuration file when installing the Ranger UserSync Process and tagsync

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


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

Branch: refs/heads/master
Commit: 82189ab24fd6957b5e877a30ddefbfd5c9c1d0b1
Parents: 8a39887
Author: zhangqiang2 <zh...@zte.com.cn>
Authored: Tue Feb 7 08:22:39 2017 -0500
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Wed Feb 8 09:44:41 2017 +0000

----------------------------------------------------------------------
 tagsync/scripts/setup.py         | 9 +++++++--
 unixauthservice/scripts/setup.py | 8 ++++++--
 2 files changed, 13 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ranger/blob/82189ab2/tagsync/scripts/setup.py
----------------------------------------------------------------------
diff --git a/tagsync/scripts/setup.py b/tagsync/scripts/setup.py
index 29369f7..88b10cc 100755
--- a/tagsync/scripts/setup.py
+++ b/tagsync/scripts/setup.py
@@ -104,9 +104,14 @@ def populate_global_dict():
     global globalDict
     read_config_file = open(os.path.join(RANGER_TAGSYNC_HOME,'install.properties'))
     for each_line in read_config_file.read().split('\n') :
-        if len(each_line) == 0 : continue
+        each_line = each_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()
             value = value.strip()
             globalDict[key] = value

http://git-wip-us.apache.org/repos/asf/ranger/blob/82189ab2/unixauthservice/scripts/setup.py
----------------------------------------------------------------------
diff --git a/unixauthservice/scripts/setup.py b/unixauthservice/scripts/setup.py
index dc383af..b773e95 100755
--- a/unixauthservice/scripts/setup.py
+++ b/unixauthservice/scripts/setup.py
@@ -97,9 +97,13 @@ def populate_global_dict():
     global globalDict
     read_config_file = open(os.path.join(RANGER_USERSYNC_HOME,'install.properties'))
     for each_line in read_config_file.read().split('\n') :
-        if len(each_line) == 0 : continue
+        each_line = each_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_USERSYNC_HOME, 'jceks','ranger_db.jceks')