]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/nfs: remove unused exception_handler function
authorJohn Mulligan <jmulligan@redhat.com>
Sat, 7 May 2022 14:24:01 +0000 (10:24 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Thu, 12 Jan 2023 18:44:11 +0000 (13:44 -0500)
This function is now unused as we no longer need to coerce exceptions
into response tuples at the layer in the code.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/pybind/mgr/nfs/export.py

index 2dbd35cac20fca5759e3285d85969b99bdfbbef8..0496f9ed80f11786a616a1af671c69664a8d9f89 100644 (file)
@@ -5,7 +5,6 @@ from typing import (
     List,
     Any,
     Dict,
-    Tuple,
     Optional,
     TYPE_CHECKING,
     TypeVar,
@@ -56,15 +55,6 @@ def known_cluster_ids(mgr: 'Module') -> Set[str]:
     return clusters
 
 
-def exception_handler(
-        exception_obj: Exception,
-        log_msg: str = ""
-) -> Tuple[int, str, str]:
-    if log_msg:
-        log.exception(log_msg)
-    return getattr(exception_obj, 'errno', -1), "", str(exception_obj)
-
-
 def _check_rados_notify(ioctx: Any, obj: str) -> None:
     try:
         ioctx.notify(obj)