Skip to content

Commit 3147d28

Browse files
committed
Fix except syntax
1 parent 1d6f6fb commit 3147d28

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stagpy/stagyyparsers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -665,14 +665,14 @@ def _get_field(xdmf_file, data_item):
665665
h5f = xdmf_file.parent / '_'.join(h5file_parts)
666666
try:
667667
fld = _read_group_h5(h5f, group).reshape(shp)
668-
except OSError, KeyError:
668+
except (OSError, KeyError):
669669
pass
670670
if fld is None:
671671
h5file_parts[-2] = '{:05d}'.format(fnum + 1)
672672
h5f = xdmf_file.parent / '_'.join(h5file_parts)
673673
try:
674674
fld = _read_group_h5(h5f, group).reshape(shp)
675-
except OSError, KeyError:
675+
except (OSError, KeyError):
676676
pass
677677
if fld is None:
678678
raise

0 commit comments

Comments
 (0)