diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2023-02-08 00:18:11 +0100 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2024-02-18 11:32:53 +0100 |
commit | d4a671d622cf558602debfee8396303986f92ac7 (patch) | |
tree | ee5e7b200208860b908f1fc81f0bd07dffe56980 /slack/python_compatibility.py | |
parent | b3a378462ba3f7851c4e4d8f63c781f8d498290d (diff) | |
download | wee-slack-d4a671d622cf558602debfee8396303986f92ac7.tar.gz |
Add -data option to /slack debug error to print rtm event data
Diffstat (limited to 'slack/python_compatibility.py')
-rw-r--r-- | slack/python_compatibility.py | 4 |
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__) |