From c67fbe7653c732d7eb54628e7d0476855eba7cfb Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Mon, 25 Apr 2016 10:23:08 -0500 Subject: [PATCH] distinguished between singular and plural in remark --- processing/post/vtk_pointcloud.py | 4 +++- processing/post/vtk_rectilinearGrid.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/processing/post/vtk_pointcloud.py b/processing/post/vtk_pointcloud.py index ffeaf0906..1c3694662 100755 --- a/processing/post/vtk_pointcloud.py +++ b/processing/post/vtk_pointcloud.py @@ -49,7 +49,9 @@ for name in filenames: remarks = [] coordDim = table.label_dimension(options.pos) if not 3 >= coordDim >= 1: errors.append('coordinates "{}" need to have one, two, or three dimensions.'.format(options.pos)) - elif coordDim < 3: remarks.append('appending {} dimensions to coordinates "{}"...'.format(3-coordDim,options.pos)) + elif coordDim < 3: remarks.append('appending {} dimension{} to coordinates "{}"...'.format(3-coordDim, + 's' if coordDim < 2 else '', + options.pos)) if remarks != []: damask.util.croak(remarks) if errors != []: diff --git a/processing/post/vtk_rectilinearGrid.py b/processing/post/vtk_rectilinearGrid.py index 510b20fab..42b3186a7 100755 --- a/processing/post/vtk_rectilinearGrid.py +++ b/processing/post/vtk_rectilinearGrid.py @@ -56,7 +56,9 @@ for name in filenames: errors = [] coordDim = table.label_dimension(options.pos) if not 3 >= coordDim >= 1: errors.append('coordinates "{}" need to have one, two, or three dimensions.'.format(options.pos)) - elif coordDim < 3: remarks.append('appending {} dimensions to coordinates "{}"...'.format(3-coordDim,options.pos)) + elif coordDim < 3: remarks.append('appending {} dimension{} to coordinates "{}"...'.format(3-coordDim, + 's' if coordDim < 2 else '', + options.pos)) if remarks != []: damask.util.croak(remarks) if errors != []: