diff --git a/.pylintrc b/.pylintrc index 78b6d2c..ff49dca 100644 --- a/.pylintrc +++ b/.pylintrc @@ -13,7 +13,8 @@ disable= redefined-outer-name, invalid-name, no-self-use, - too-many-instance-attributes + too-many-instance-attributes, + fixme [FORMAT] indent-string=' ' diff --git a/src/log.py b/src/log.py index 21cb5f3..1a94c77 100644 --- a/src/log.py +++ b/src/log.py @@ -62,5 +62,9 @@ class DiscordLogger(logging.Handler): if self._channel is not None: await self._channel.send(msg) - - asyncio.create_task(_emit_to_channel()) + try: + asyncio.create_task(_emit_to_channel()) + except RuntimeError: + # This is a hotfix for "RuntimeError: no running event loop" (see #22) + # TODO investigate #22 and replace hotfix with proper fix + pass