]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/smb: fix some incorrect f-strings when raising validation error
authorJohn Mulligan <jmulligan@redhat.com>
Wed, 8 May 2024 15:52:15 +0000 (11:52 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Mon, 24 Jun 2024 12:41:08 +0000 (08:41 -0400)
Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/pybind/mgr/smb/validation.py

index d0890d2fc09e2e78991c347c9a9808145b24b85a..f9607cddcdf56c30a204c5f768030020fd154f22 100644 (file)
@@ -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