From 92a67e1a9d5059133383966dc7053ffe64b16915 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 1 Apr 2015 14:42:25 +0000 Subject: [PATCH] geom_fromAng.py crashed when found empty line (eg. at the end of the file), now fixed --- processing/post/postResults.py | 2 -- processing/pre/geom_fromAng.py | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/processing/post/postResults.py b/processing/post/postResults.py index 92f77c6dd..a0d6b53ec 100755 --- a/processing/post/postResults.py +++ b/processing/post/postResults.py @@ -317,7 +317,6 @@ class MPIEspectral_result: # mimic py_post result object return [elemental_scalar(node,value) for node in self.element(e).items] - def element_scalar_label(elem,idx): return 'User Defined Variable %i'%(idx+1) @@ -566,7 +565,6 @@ def ParsePostfile(p,filename, outputFormat): # needs "outputFormat" for mapping of output names to postfile output indices # ----------------------------- - # --- build statistics stat = { \ diff --git a/processing/pre/geom_fromAng.py b/processing/pre/geom_fromAng.py index ed04ccbbe..039e7601f 100755 --- a/processing/pre/geom_fromAng.py +++ b/processing/pre/geom_fromAng.py @@ -85,6 +85,7 @@ for file in files: point = 0 for line in file['input']: words = line.split() + if len(words) == 0: continue # ignore empty lines if words[0] == '#': # process initial comments block if len(words) > 2: if words[2].lower() == 'hexgrid':