fixed stupid bug addressing a dict by dict{key} instead of dict[key]

This commit is contained in:
Philip Eisenlohr 2013-12-11 14:30:27 +00:00
parent 44b3687e7c
commit 894776ca67
1 changed files with 2 additions and 2 deletions

View File

@ -97,13 +97,13 @@ for file in files:
interpolator += ['float(table.data[%i])'%(int(column))] interpolator += ['float(table.data[%i])'%(int(column))]
else: else:
file['croak'].write('column %s not found...\n'%column) file['croak'].write('column %s not found...\n'%column)
brokenFormula{label} = True brokenFormula[label] = True
else: else:
try: try:
interpolator += ['float(table.data[%i])'%table.labels.index(column)] interpolator += ['float(table.data[%i])'%table.labels.index(column)]
except: except:
file['croak'].write('column %s not found...\n'%column) file['croak'].write('column %s not found...\n'%column)
brokenFormula{label} = True brokenFormula[label] = True
if label not in brokenFormula: if label not in brokenFormula:
evaluator[label] = "'" + formula + "'.format(" + ','.join(interpolator) + ")" evaluator[label] = "'" + formula + "'.format(" + ','.join(interpolator) + ")"