We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3c08548 commit 73c59c6Copy full SHA for 73c59c6
bot/__init__.py
@@ -1,5 +1,6 @@
1
"""The main bot module, contains all code for the bot application."""
2
3
+import asyncio
4
import logging
5
import os
6
from pathlib import Path
@@ -30,6 +31,10 @@
30
31
console_handler.setFormatter(log_formatter)
32
log.addHandler(console_handler)
33
34
+# On Windows, the selector event loop is required for aiodns.
35
+if os.name == "nt":
36
+ asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
37
+
38
log.info("Cleaning out image_cache")
39
40
img_dir = os.listdir(IMG_CACHE)
0 commit comments