now aware of empty lines
This commit is contained in:
parent
b0ba5f7ba3
commit
485ed3742c
|
@ -65,10 +65,11 @@ pathInfo = {}
|
||||||
DamaskRoot = os.path.normpath(os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])),'../'))
|
DamaskRoot = os.path.normpath(os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])),'../'))
|
||||||
try: # check for user-defined pathinfo
|
try: # check for user-defined pathinfo
|
||||||
file = open(os.path.join(DamaskRoot,'lib/pathinfo'))
|
file = open(os.path.join(DamaskRoot,'lib/pathinfo'))
|
||||||
content = file.readlines()
|
content = map(lambda string: string.strip(),file.readlines())
|
||||||
file.close()
|
file.close()
|
||||||
for line in content:
|
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:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue