Skip to content

Commit

Permalink
Change: Update error message if Enum can't be created
Browse files Browse the repository at this point in the history
Don't show the enum name in the error message. A user might not know the
actual enum and just passed a string.
  • Loading branch information
bjoernricks authored and greenbonebot committed Jun 14, 2024
1 parent 20bb19c commit a309455
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gvm/_enum.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ def from_string(
return cls[value.replace(" ", "_").upper()]
except KeyError:
raise InvalidArgument(
f"Invalid argument {value} for {cls.__name__}.from_string. "
f"Invalid argument {value}. "
f"Allowed values are {','.join(e.name for e in cls)}."
) from None

0 comments on commit a309455

Please sign in to comment.