diff options
| author | Josh <[email protected]> | 2020-06-28 17:53:29 +1000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-06-28 03:53:29 -0400 |
| commit | 6b5be39cd2468fcef3753cacbc014f2c55956e16 (patch) | |
| tree | 59b03b4831dae867688d50bf1f752c1006dbaee4 | |
| parent | [commands] Add a new exception class for command registration errors (diff) | |
| download | discord.py-6b5be39cd2468fcef3753cacbc014f2c55956e16.tar.xz discord.py-6b5be39cd2468fcef3753cacbc014f2c55956e16.zip | |
[tasks] Fix issue with default error handler in class context
| -rw-r--r-- | discord/ext/tasks/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/discord/ext/tasks/__init__.py b/discord/ext/tasks/__init__.py index 833fc65a..8a2ea511 100644 --- a/discord/ext/tasks/__init__.py +++ b/discord/ext/tasks/__init__.py @@ -293,7 +293,8 @@ class Loop: """ return not bool(self._task.done()) if self._task else False - async def _error(self, exception): + async def _error(self, *args): + exception = args[-1] print('Unhandled exception in internal background task {0.__name__!r}.'.format(self.coro), file=sys.stderr) traceback.print_exception(type(exception), exception, exception.__traceback__, file=sys.stderr) |