From 485ed3742cb9316c57ff1ff05956da9801189530 Mon Sep 17 00:00:00 2001 From: Franz Roters Date: Tue, 20 Dec 2011 11:04:29 +0000 Subject: [PATCH] now aware of empty lines --- installation/setup_shellrc.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/installation/setup_shellrc.py b/installation/setup_shellrc.py index 438aa810c..da036851c 100755 --- a/installation/setup_shellrc.py +++ b/installation/setup_shellrc.py @@ -65,10 +65,11 @@ pathInfo = {} DamaskRoot = os.path.normpath(os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])),'../')) try: # check for user-defined pathinfo file = open(os.path.join(DamaskRoot,'lib/pathinfo')) - content = file.readlines() + content = map(lambda string: string.strip(),file.readlines()) file.close() for line in content: - pathInfo[line.split()[0].lower()] = os.path.normpath(line.split()[1]) + if not (line.startswith('#') or line == ''): + pathInfo[line.split()[0].lower()] = os.path.normpath(line.split()[1]) except: pass