From: John Mulligan Date: Wed, 8 May 2024 15:52:15 +0000 (-0400) Subject: mgr/smb: fix some incorrect f-strings when raising validation error X-Git-Tag: v20.0.0~1619^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=660d74bba6738664af1ebce3a09c614b7aa501e4;p=ceph.git mgr/smb: fix some incorrect f-strings when raising validation error Signed-off-by: John Mulligan --- diff --git a/src/pybind/mgr/smb/validation.py b/src/pybind/mgr/smb/validation.py index d0890d2fc09..f9607cddcdf 100644 --- a/src/pybind/mgr/smb/validation.py +++ b/src/pybind/mgr/smb/validation.py @@ -26,7 +26,7 @@ def valid_id(value: str) -> bool: def check_id(value: str) -> None: """Raise ValueError if value is not a valid ID.""" if not valid_id(value): - raise ValueError(f"{value:!r} is not a valid ID") + raise ValueError(f"{value!r} is not a valid ID") def valid_share_name(value: str) -> bool: @@ -37,7 +37,7 @@ def valid_share_name(value: str) -> bool: def check_share_name(value: str) -> None: """Raise ValueError if value is not a valid share name.""" if not valid_share_name(value): - raise ValueError(f"{value:!r} is not a valid share name") + raise ValueError(f"{value!r} is not a valid share name") # alias for normpath so other smb libs can just import validation module