support python 3.6

This commit is contained in:
Lex Berezhny 2018-10-15 08:56:23 -04:00
parent aa73cb9bbf
commit ae0e1bfaef

View file

@ -95,7 +95,9 @@ class BaseHeaders:
async def connect(self, start: int, headers: bytes) -> int:
added = 0
bail = False
loop = asyncio.get_running_loop()
# TODO: switch to get_running_loop() after depricating python 3.6 support
#loop = asyncio.get_running_loop()
loop = asyncio.get_event_loop()
async with self._header_connect_lock:
for height, chunk in self._iterate_chunks(start, headers):
try: