e2e: Switch from coroutines to async, for python3.8
This commit is contained in:
@@ -135,10 +135,10 @@ class XMPPComponent(slixmpp.BaseXMPP):
|
|||||||
if self.biboumi:
|
if self.biboumi:
|
||||||
self.biboumi.stop()
|
self.biboumi.stop()
|
||||||
|
|
||||||
@asyncio.coroutine
|
|
||||||
def accept_routine(self):
|
async def accept_routine(self):
|
||||||
self.accepting_server = yield from self.loop.create_server(lambda: self,
|
self.accepting_server = await self.loop.create_server(lambda: self,
|
||||||
"127.0.0.1", 8811, reuse_address=True)
|
"127.0.0.1", 8811, reuse_address=True)
|
||||||
|
|
||||||
|
|
||||||
class ProcessRunner:
|
class ProcessRunner:
|
||||||
@@ -147,13 +147,11 @@ class ProcessRunner:
|
|||||||
self.signal_sent = False
|
self.signal_sent = False
|
||||||
self.create = None
|
self.create = None
|
||||||
|
|
||||||
@asyncio.coroutine
|
async def start(self):
|
||||||
def start(self):
|
self.process = await self.create
|
||||||
self.process = yield from self.create
|
|
||||||
|
|
||||||
@asyncio.coroutine
|
async def wait(self):
|
||||||
def wait(self):
|
code = await self.process.wait()
|
||||||
code = yield from self.process.wait()
|
|
||||||
return code
|
return code
|
||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user