From 2535bbbcf17bb43db8878f5bb94f335e66074456 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sat, 8 Feb 2020 13:24:01 +0100 Subject: [PATCH] Fix #1180 working on windows with tornado and python <3.8 again --- cps/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cps/server.py b/cps/server.py index 43792ecd..8f060719 100755 --- a/cps/server.py +++ b/cps/server.py @@ -146,7 +146,7 @@ class WebServer(object): self.unix_socket_file = None def _start_tornado(self): - if os.name == 'nt': + if os.name == 'nt' and sys.version_info > (3, 7): import asyncio asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) log.info('Starting Tornado server on %s', _readable_listen_address(self.listen_address, self.listen_port))