polishing and now explicitly closing input table.

This commit is contained in:
Philip Eisenlohr 2016-04-13 17:48:49 -04:00
parent 6e2ca7d595
commit feae2164fc
1 changed files with 5 additions and 3 deletions

View File

@ -83,9 +83,9 @@ damask.util.croak('{}: {} points and {} cells...'.format(options.vtk,Npoints,Nce
if filenames == []: filenames = [None]
for name in filenames:
try:
table = damask.ASCIItable(name = name,
buffered = False, readonly = True)
try: table = damask.ASCIItable(name = name,
buffered = False,
readonly = True)
except: continue
damask.util.report(scriptName, name)
@ -133,6 +133,8 @@ for name in filenames:
elif datatype == 'vector': VTKarray[me].InsertNextTuple3(*map(float,theData))
elif datatype == 'scalar': VTKarray[me].InsertNextValue(float(theData[0]))
table.input_close() # close input ASCII table
# ------------------------------------------ add data ---------------------------------------
for datatype,labels in active.items(): # loop over scalar,color