specifying non-existing or invalid files is an user error

this is the standard behavior for common unix tools, no need to make an
exception here
This commit is contained in:
Martin Diehl 2019-05-25 08:24:32 +02:00
parent cf374a04dc
commit 6c7f7c77da
2 changed files with 4 additions and 6 deletions

View File

@ -72,9 +72,8 @@ for name in filenames:
virt_file = StringIO(''.join(sys.stdin.read()))
geom = damask.Geom.from_file(virt_file)
else:
try: # really needed? Why not simply fail if file does not exists etc.
geom = damask.Geom.from_file(name)
except: continue
damask.util.report(scriptName,name)
microstructure = geom.microstructure

View File

@ -69,9 +69,8 @@ for name in filenames:
virt_file = StringIO(''.join(sys.stdin.read()))
geom = damask.Geom.from_file(virt_file)
else:
try: # really needed? Why not simply fail if file does not exists etc.
geom = damask.Geom.from_file(name)
except: continue
damask.util.report(scriptName,name)
microstructure = geom.microstructure