Skip to content

Commit a83ddf4

Browse files
authored
fix: inconsistent use of tabs/spaces (#852)
1 parent c7137ee commit a83ddf4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

interactions/client/bot.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import re
22
import sys
3-
from asyncio import get_event_loop, iscoroutinefunction
3+
from asyncio import CancelledError, get_event_loop, iscoroutinefunction
44
from functools import wraps
55
from importlib import import_module
66
from importlib.util import resolve_name
@@ -135,7 +135,10 @@ def latency(self) -> float:
135135

136136
def start(self) -> None:
137137
"""Starts the client session."""
138-
self._loop.run_until_complete(self._ready())
138+
try:
139+
self._loop.run_until_complete(self._ready())
140+
except (CancelledError, Exception) as e:
141+
raise e from e
139142

140143
def __register_events(self) -> None:
141144
"""Registers all raw gateway events to the known events."""

0 commit comments

Comments
 (0)