diff --git a/openmc/mgxs/library.py b/openmc/mgxs/library.py index 2c4423c257..aca46958df 100644 --- a/openmc/mgxs/library.py +++ b/openmc/mgxs/library.py @@ -412,7 +412,7 @@ class Library: if self.correction == 'P0' and legendre_order > 0: msg = 'The P0 correction will be ignored since the ' \ 'scattering order {} is greater than '\ - 'zero'.format(self.legendre_order) + 'zero'.format(legendre_order) warn(msg, RuntimeWarning) self.correction = None elif self.scatter_format == 'histogram': diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index c336cb50de..5525a6da0a 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -4160,7 +4160,7 @@ class ScatterMatrixXS(MatrixMGXS): if self.correction == 'P0' and legendre_order > 0: msg = 'The P0 correction will be ignored since the ' \ 'scattering order {} is greater than '\ - 'zero'.format(self.legendre_order) + 'zero'.format(legendre_order) warnings.warn(msg, RuntimeWarning) self.correction = None elif self.scatter_format == SCATTER_HISTOGRAM: