Support older versions of HDF5 data for IncidentNeutron.from_hdf5

This commit is contained in:
Paul Romano 2018-11-13 06:51:03 -06:00
parent 7c3c0bb731
commit 3079afa3d8

View file

@ -502,11 +502,7 @@ class IncidentNeutron(EqualityMixin):
# Make sure version matches
if 'version' in h5file.attrs:
major, minor = h5file.attrs['version']
if major != HDF5_VERSION_MAJOR:
raise IOError(
'HDF5 data format uses version {}.{} whereas your '
'installation of the OpenMC Python API expects version '
'{}.x.'.format(major, minor, HDF5_VERSION_MAJOR))
# For now all versions of HDF5 data can be read
else:
raise IOError(
'HDF5 data does not indicate a version. Your installation of '