From a30945525573f78d7e508531372cb480243afbbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ricks?= Date: Wed, 6 Mar 2024 15:48:34 +0100 Subject: [PATCH] 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. --- gvm/_enum.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gvm/_enum.py b/gvm/_enum.py index 45783cc9c..e44b962b1 100644 --- a/gvm/_enum.py +++ b/gvm/_enum.py @@ -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