aboutsummaryrefslogtreecommitdiffstats
path: root/slack/task.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2023-01-28 16:34:47 +0100
committerTrygve Aaberge <trygveaa@gmail.com>2024-02-18 11:32:53 +0100
commit9ba4a562541ff031e95b695d4939c83d165d6f70 (patch)
tree394f38a1ab785d65177baa0574ce68d9eb13e252 /slack/task.py
parent26d3c52e775a806756bfbfc4d8b39537ed94f6a6 (diff)
downloadwee-slack-9ba4a562541ff031e95b695d4939c83d165d6f70.tar.gz
Use BaseException instead of Exception in task.py
Diffstat (limited to 'slack/task.py')
-rw-r--r--slack/task.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/slack/task.py b/slack/task.py
index facc0e2..149b180 100644
--- a/slack/task.py
+++ b/slack/task.py
@@ -38,7 +38,7 @@ class Future(Awaitable[T]):
def __await__(self) -> Generator[Future[T], T, T]:
result = yield self
- if isinstance(result, Exception):
+ if isinstance(result, BaseException):
raise result
self.set_result(result)
return result
@@ -93,7 +93,7 @@ def task_runner(task: Task[Any], response: Any):
while True:
try:
future = task.coroutine.send(response)
- except Exception as e:
+ except BaseException as e:
result = e.value if isinstance(e, StopIteration) else e
process_ended_task(task, result)
if isinstance(e, HttpError):