Skip to content

Commit

Permalink
Fix raised exception text using format string
Browse files Browse the repository at this point in the history
  • Loading branch information
parejkoj committed May 5, 2019
1 parent 3de5020 commit 243ffff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/lsst/jointcal/jointcal.py
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ def _logChi2AndValidate(self, associations, fit, model, chi2Label="Model",
self.log.info("%s %s", chi2Label, chi2)
self._check_stars(associations)
if not np.isfinite(chi2.chi2):
raise FloatingPointError('%s chi2 is invalid: %s', chi2Label, chi2)
raise FloatingPointError(f'{chi2Label} chi2 is invalid: {chi2}')
if not model.validate(associations.getCcdImageList(), chi2.ndof):
raise ValueError("Model is not valid: check log messages for warnings.")
return chi2
Expand Down

0 comments on commit 243ffff

Please sign in to comment.