correctly handling whitespace
This commit is contained in:
parent
23a57ec78f
commit
b02bbc77d8
|
@ -1,7 +1,6 @@
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
|
import os,subprocess,shlex,re,string
|
||||||
import os,subprocess,shlex,re
|
|
||||||
|
|
||||||
class Environment():
|
class Environment():
|
||||||
__slots__ = [ \
|
__slots__ = [ \
|
||||||
|
@ -23,7 +22,7 @@ class Environment():
|
||||||
for line in configFile:
|
for line in configFile:
|
||||||
l = re.sub('^set ', '', line).strip() # remove "set" (tcsh) when setting variables
|
l = re.sub('^set ', '', line).strip() # remove "set" (tcsh) when setting variables
|
||||||
if l and not l.startswith('#'):
|
if l and not l.startswith('#'):
|
||||||
items = l.split('=')
|
items = map(string.strip,l.split('='))
|
||||||
if len(items) == 2:
|
if len(items) == 2:
|
||||||
self.options[items[0].upper()] = \
|
self.options[items[0].upper()] = \
|
||||||
re.sub('\$\{*DAMASK_ROOT\}*',self.rootDir(),os.path.expandvars(items[1])) # expand all shell variables and DAMASK_ROOT
|
re.sub('\$\{*DAMASK_ROOT\}*',self.rootDir(),os.path.expandvars(items[1])) # expand all shell variables and DAMASK_ROOT
|
||||||
|
|
Loading…
Reference in New Issue