aboutsummaryrefslogtreecommitdiffstats
path: root/slack/python_compatibility.py
diff options
context:
space:
mode:
Diffstat (limited to 'slack/python_compatibility.py')
-rw-r--r--slack/python_compatibility.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/slack/python_compatibility.py b/slack/python_compatibility.py
index e96b8af..8aa8a84 100644
--- a/slack/python_compatibility.py
+++ b/slack/python_compatibility.py
@@ -18,5 +18,9 @@ def removesuffix(self: str, suffix: str) -> str:
return self[:]
+def format_exception_only(exc: BaseException) -> List[str]:
+ return traceback.format_exception_only(type(exc), exc)
+
+
def format_exception(exc: BaseException) -> List[str]:
return traceback.format_exception(type(exc), exc, exc.__traceback__)