geom_fromAng.py crashed when found empty line (eg. at the end of the file), now fixed

This commit is contained in:
Martin Diehl 2015-04-01 14:42:25 +00:00
parent a1956436be
commit 92a67e1a9d
2 changed files with 1 additions and 2 deletions

View File

@ -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 = { \

View File

@ -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':