Make uvloop an optional dependency
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
import asyncio
|
||||
import os
|
||||
import uvloop
|
||||
|
||||
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
|
||||
try:
|
||||
# uvloop doesn't work on Windows, therefore an optional dependency
|
||||
import uvloop
|
||||
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
from pluralkit import bot
|
||||
bot.run()
|
||||
Reference in New Issue
Block a user