From feae2164fc18bbbe04decb616b998055b151edf0 Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Wed, 13 Apr 2016 17:48:49 -0400 Subject: [PATCH] polishing and now explicitly closing input table. --- processing/post/vtk_addRectilinearGridData.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/processing/post/vtk_addRectilinearGridData.py b/processing/post/vtk_addRectilinearGridData.py index 3ca54d84e..6b78950c7 100755 --- a/processing/post/vtk_addRectilinearGridData.py +++ b/processing/post/vtk_addRectilinearGridData.py @@ -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