small bug fix for last commit

This commit is contained in:
Martin Diehl 2014-10-24 06:36:01 +00:00
parent 13ba71a314
commit bdd2d55383
1 changed files with 3 additions and 2 deletions

View File

@ -62,8 +62,9 @@ for name in filenames:
positions.append(position) # ...and position
interpolator = []
for position,operand in enumerate(set(re.findall(r'#(([s]#)?(.+?))#',options.condition))): # find three groups
condition = options.condition.replace('#'+operand[0]+'#',
condition = options.condition # copy per file, might be altered
for position,operand in enumerate(set(re.findall(r'#(([s]#)?(.+?))#',condition))): # find three groups
condition = condition.replace('#'+operand[0]+'#',
{ '': '{%i}'%position,
's#':'"{%i}"'%position}[operand[1]])
if operand[2] in specials: # special label ?