Skip to content

Commit

Permalink
Merge pull request projectmesa#973 from projectmesa/fix-asyncio-win-p…
Browse files Browse the repository at this point in the history
…ython-36

Fix asyncio on windows with python 3.6
  • Loading branch information
jackiekazil authored Feb 8, 2021
2 parents aabb542 + a88f31b commit 87da503
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mesa/visualization/ModularVisualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"""
import asyncio
import os
import sys
import platform
import tornado.autoreload
import tornado.ioloop
import tornado.web
Expand All @@ -113,7 +113,7 @@
# pylint: disable=attribute-defined-outside-init

# Change the event loop policy for windows
if sys.platform == "win32":
if platform.system() == "Windows" and platform.python_version_tuple() >= ("3", "7"):
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())


Expand Down

0 comments on commit 87da503

Please sign in to comment.