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]
|
||||
|
||||
for name in filenames:
|
||||
try: table = damask.ASCIItable(name = name,
|
||||
buffered = False)
|
||||
except: continue
|
||||
try:
|
||||
table = damask.ASCIItable(name = name, buffered = False)
|
||||
except IOError:
|
||||
continue
|
||||
damask.util.report(scriptName,name)
|
||||
|
||||
# ------------------------------------------ read header -------------------------------------------
|
||||
|
|
|
@ -41,9 +41,9 @@ if filenames == []: filenames = [None]
|
|||
|
||||
for name in filenames:
|
||||
try:
|
||||
table = damask.ASCIItable(name = name,
|
||||
buffered = False)
|
||||
except IOError: continue
|
||||
table = damask.ASCIItable(name = name, buffered = False)
|
||||
except IOError:
|
||||
continue
|
||||
damask.util.report(scriptName,name)
|
||||
|
||||
# ------------------------------------------ read header ------------------------------------------
|
||||
|
|
|
@ -125,9 +125,10 @@ R = damask.Rotation.fromAxisAngle(np.array(options.labrotation),options.degrees,
|
|||
if filenames == []: filenames = [None]
|
||||
|
||||
for name in filenames:
|
||||
try: table = damask.ASCIItable(name = name,
|
||||
buffered = False)
|
||||
except Exception: continue
|
||||
try:
|
||||
table = damask.ASCIItable(name = name, buffered = False)
|
||||
except IOError:
|
||||
continue
|
||||
damask.util.report(scriptName,name)
|
||||
|
||||
# ------------------------------------------ read header ------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue