Skip to content

Commit

Permalink
Fix duplicate parameter error message
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremykubica committed Jul 9, 2024
1 parent 0c31e23 commit 4b17df3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tdastro/base_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def add_parameter(self, name, value=None, required=False, **kwargs):
Raise a ``ValueError`` if the parameter is required, but set to None.
"""
if hasattr(self, name) and getattr(self, name) is not None:
raise KeyError(f"Duplicate parameter set: {KeyError}")
raise KeyError(f"Duplicate parameter set: {name}")

if value is None and name in kwargs:
# The value wasn't set, but the name is in kwargs.
Expand Down

0 comments on commit 4b17df3

Please sign in to comment.