Skip to content

Commit a309455

Browse files
bjoernricksgreenbonebot
authored andcommitted
Change: Update error message if Enum can't be created
Don't show the enum name in the error message. A user might not know the actual enum and just passed a string.
1 parent 20bb19c commit a309455

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gvm/_enum.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ def from_string(
3737
return cls[value.replace(" ", "_").upper()]
3838
except KeyError:
3939
raise InvalidArgument(
40-
f"Invalid argument {value} for {cls.__name__}.from_string. "
40+
f"Invalid argument {value}. "
4141
f"Allowed values are {','.join(e.name for e in cls)}."
4242
) from None

0 commit comments

Comments
 (0)