now skips environment variables in comments, i.e. after '#'

This commit is contained in:
Franz Roters 2012-01-31 15:43:39 +00:00
parent 80583fefb5
commit 93f311f2b9
1 changed files with 6 additions and 0 deletions

View File

@ -106,6 +106,12 @@ if theShell == 'bash':
for var in env_order:
m = re.search(r'^(.*? %s=)([^;]*)(.*)$'%var,line)
if m:
n = re.search(r'(%s)'%var, line)
o = re.search(r'(#)', line)
if o:
if o.start() < n.start():
print 'skipped potential comment line, please check'
continue
match[var] = True
items = m.group(2).split(':')
for piece in environment[var]: