From 6c7f7c77dac1eaee5342bd452b621c7403000420 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 25 May 2019 08:24:32 +0200 Subject: [PATCH] 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 --- processing/pre/geom_rotate.py | 5 ++--- processing/pre/geom_vicinityOffset.py | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/processing/pre/geom_rotate.py b/processing/pre/geom_rotate.py index 57f4eacbf..c343e2752 100755 --- a/processing/pre/geom_rotate.py +++ b/processing/pre/geom_rotate.py @@ -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 + geom = damask.Geom.from_file(name) + damask.util.report(scriptName,name) microstructure = geom.microstructure diff --git a/processing/pre/geom_vicinityOffset.py b/processing/pre/geom_vicinityOffset.py index 73a14520f..e23d905f9 100755 --- a/processing/pre/geom_vicinityOffset.py +++ b/processing/pre/geom_vicinityOffset.py @@ -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 + geom = damask.Geom.from_file(name) + damask.util.report(scriptName,name) microstructure = geom.microstructure