[main.py] Temporary "fix" for windows socket

This commit is contained in:
Suwako Moriya 2020-04-20 20:12:33 +02:00
parent bca15ac34d
commit 0b6049173d
Signed by: SuwakoMmh
GPG Key ID: A27482B806F13CD5

View File

@ -8,6 +8,7 @@ import locale
import logging
import logging.config
import os
import sys
import traceback
from typing import Dict
@ -493,6 +494,8 @@ if __name__ == "__main__":
loop = asyncio.get_event_loop()
t = loop.create_unix_server(Communication,
path=os.path.join("/tmp", os.path.dirname(os.path.realpath(__file__)) + ".sock"))
if not sys.platform == "win32":
loop.run_until_complete(t)
loop.create_task(start_bot())
loop.run_forever()