Skip to content

Commit

Permalink
Fix Syntax error thrown in 3.7
Browse files Browse the repository at this point in the history
Maintains backward compat.
  • Loading branch information
EvieePy authored and aaugustin committed Dec 16, 2017
1 parent 136d9bc commit 9f566c5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions websockets/compatibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@


# Replace with BaseEventLoop.create_task when dropping Python < 3.4.2.
try: # pragma: no cover
asyncio_ensure_future = asyncio.ensure_future # Python ≥ 3.5
except AttributeError: # pragma: no cover
asyncio_ensure_future = asyncio.async # Python < 3.5
try: # pragma: no cover
asyncio_ensure_future = asyncio.ensure_future # Python ≥ 3.5
except AttributeError: # pragma: no cover
asyncio_ensure_future = getattr(asyncio, 'async') # Python < 3.5

try: # pragma: no cover
# Python ≥ 3.5
Expand Down

0 comments on commit 9f566c5

Please sign in to comment.