From bb64ecc8177180584697aa34ab4162d5d61879ef Mon Sep 17 00:00:00 2001 From: DonLarry <38328365+DonLarry@users.noreply.github.com> Date: Thu, 13 Jun 2024 21:36:23 -0400 Subject: [PATCH] Fix baseclient.py If `loop` is None at line 55, it remains None because it wasn't modified earlier. The `self.loop` was updated when `update_event_loop` function was invoked at line 31. So, we should use `self.loop` or assign `self.loop` to `loop` before using it. --- pypresence/baseclient.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pypresence/baseclient.py b/pypresence/baseclient.py index 78e7d11..a8c088f 100644 --- a/pypresence/baseclient.py +++ b/pypresence/baseclient.py @@ -52,7 +52,7 @@ def __init__(self, client_id: str, **kwargs): else: err_handler = self._err_handle - loop.set_exception_handler(err_handler) + self.loop.set_exception_handler(err_handler) self.handler = handler if getattr(self, "on_event", None): # Tasty bad code ;^)