diff options
author | 2020-05-23 00:33:12 -0400 | |
---|---|---|
committer | 2020-05-23 00:33:12 -0400 | |
commit | 29304c07254ebdb652f402a8ca05229bc90668ae (patch) | |
tree | b9f37e023c514d3d88945ed7988b438840fbf521 /bot/__init__.py | |
parent | exit minesweeper early if DM disabled (diff) | |
parent | Merge pull request #403 from Akarys42/boo-fix (diff) |
Merge branch 'master' into minesweeper-disabled-dm-handling
Diffstat (limited to 'bot/__init__.py')
-rw-r--r-- | bot/__init__.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bot/__init__.py b/bot/__init__.py index 4729e50c..6976e089 100644 --- a/bot/__init__.py +++ b/bot/__init__.py @@ -1,3 +1,4 @@ +import asyncio import logging import logging.handlers import os @@ -63,3 +64,8 @@ logging.basicConfig( handlers=[console_handler, file_handler] ) logging.getLogger().info('Logging initialization complete') + + +# On Windows, the selector event loop is required for aiodns. +if os.name == "nt": + asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) |