mirror of
https://github.com/Mailu/Mailu.git
synced 2025-01-18 03:21:36 +02:00
Merge pull request #6 from Nebukadneza/fix_py37
Don’t use deprecated now-keyword "async"
This commit is contained in:
parent
6fadd39aea
commit
e2979f9103
@ -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…
x
Reference in New Issue
Block a user