Skip to content

Commit 4be31e3

Browse files
LulalabyCopilot
andauthored
Update discord/client.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Lala Sabathil <aiko@aitsys.dev>
1 parent 29f6358 commit 4be31e3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

discord/client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,10 @@ def __init__(
264264
self.loop = asyncio.new_event_loop()
265265
try:
266266
asyncio.set_event_loop(self.loop)
267-
except Exception:
268-
# If for some reason setting the loop fails, continue
267+
except Exception as exc:
268+
# If for some reason setting the loop fails, log the exception and continue
269269
# using the locally created loop without setting it.
270-
pass
270+
logging.exception("Failed to set event loop: %s", exc)
271271
self._listeners: dict[str, list[tuple[asyncio.Future, Callable[..., bool]]]] = (
272272
{}
273273
)

0 commit comments

Comments
 (0)