[main.py] Temporary "fix" for windows socket
This commit is contained in:
parent
bca15ac34d
commit
0b6049173d
3
main.py
3
main.py
@ -8,6 +8,7 @@ import locale
|
|||||||
import logging
|
import logging
|
||||||
import logging.config
|
import logging.config
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
from typing import Dict
|
from typing import Dict
|
||||||
|
|
||||||
@ -493,6 +494,8 @@ if __name__ == "__main__":
|
|||||||
loop = asyncio.get_event_loop()
|
loop = asyncio.get_event_loop()
|
||||||
t = loop.create_unix_server(Communication,
|
t = loop.create_unix_server(Communication,
|
||||||
path=os.path.join("/tmp", os.path.dirname(os.path.realpath(__file__)) + ".sock"))
|
path=os.path.join("/tmp", os.path.dirname(os.path.realpath(__file__)) + ".sock"))
|
||||||
|
if not sys.platform == "win32":
|
||||||
loop.run_until_complete(t)
|
loop.run_until_complete(t)
|
||||||
|
|
||||||
loop.create_task(start_bot())
|
loop.create_task(start_bot())
|
||||||
loop.run_forever()
|
loop.run_forever()
|
||||||
|
Loading…
Reference in New Issue
Block a user