Merge pull request #6 from Nebukadneza/fix_py37

Don’t use deprecated now-keyword "async"
main
kaiyou 5 years ago committed by Alexander Graf
parent 6fadd39aea
commit e2979f9103
No known key found for this signature in database
GPG Key ID: B8A9DC143E075629

@ -4,7 +4,6 @@
import asyncio
import logging
class NetstringProtocol(asyncio.Protocol):
""" Netstring asyncio protocol implementation.
@ -91,7 +90,7 @@ class SocketmapProtocol(NetstringProtocol):
if space != -1:
name = string[:space].decode('ascii')
key = string[space+1:].decode('utf8')
return asyncio.async(self.process_request(name, key))
return asyncio.ensure_future(self.process_request(name, key))
async def process_request(self, name, key):
""" Process a request by querying the provided map.

Loading…
Cancel
Save