do not use bare except
This commit is contained in:
parent
c6c77b64d2
commit
b92cfbbd5b
|
@ -65,9 +65,10 @@ for i in range(len(options.formulas)):
|
||||||
if filenames == []: filenames = [None]
|
if filenames == []: filenames = [None]
|
||||||
|
|
||||||
for name in filenames:
|
for name in filenames:
|
||||||
try: table = damask.ASCIItable(name = name,
|
try:
|
||||||
buffered = False)
|
table = damask.ASCIItable(name = name, buffered = False)
|
||||||
except: continue
|
except IOError:
|
||||||
|
continue
|
||||||
damask.util.report(scriptName,name)
|
damask.util.report(scriptName,name)
|
||||||
|
|
||||||
# ------------------------------------------ read header -------------------------------------------
|
# ------------------------------------------ read header -------------------------------------------
|
||||||
|
|
|
@ -41,9 +41,9 @@ if filenames == []: filenames = [None]
|
||||||
|
|
||||||
for name in filenames:
|
for name in filenames:
|
||||||
try:
|
try:
|
||||||
table = damask.ASCIItable(name = name,
|
table = damask.ASCIItable(name = name, buffered = False)
|
||||||
buffered = False)
|
except IOError:
|
||||||
except IOError: continue
|
continue
|
||||||
damask.util.report(scriptName,name)
|
damask.util.report(scriptName,name)
|
||||||
|
|
||||||
# ------------------------------------------ read header ------------------------------------------
|
# ------------------------------------------ read header ------------------------------------------
|
||||||
|
|
|
@ -125,9 +125,10 @@ R = damask.Rotation.fromAxisAngle(np.array(options.labrotation),options.degrees,
|
||||||
if filenames == []: filenames = [None]
|
if filenames == []: filenames = [None]
|
||||||
|
|
||||||
for name in filenames:
|
for name in filenames:
|
||||||
try: table = damask.ASCIItable(name = name,
|
try:
|
||||||
buffered = False)
|
table = damask.ASCIItable(name = name, buffered = False)
|
||||||
except Exception: continue
|
except IOError:
|
||||||
|
continue
|
||||||
damask.util.report(scriptName,name)
|
damask.util.report(scriptName,name)
|
||||||
|
|
||||||
# ------------------------------------------ read header ------------------------------------------
|
# ------------------------------------------ read header ------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue