next_line() doesn't need wait_for
param
This commit is contained in:
parent
423623fec1
commit
d837529698
1 changed files with 2 additions and 4 deletions
|
@ -100,8 +100,7 @@ class Server(IServer):
|
|||
async def line_read(self, line: Line):
|
||||
pass
|
||||
|
||||
async def next_line(self, wait_for: bool = False
|
||||
) -> Tuple[Line, List[Emit]]:
|
||||
async def next_line(self) -> Tuple[Line, List[Emit]]:
|
||||
if self._read_queue:
|
||||
both = self._read_queue.popleft()
|
||||
else:
|
||||
|
@ -119,10 +118,9 @@ class Server(IServer):
|
|||
|
||||
return both
|
||||
|
||||
|
||||
async def wait_for(self, response: IMatchResponse) -> Line:
|
||||
while True:
|
||||
both = await self.next_line(wait_for=True)
|
||||
both = await self.next_line()
|
||||
line, emits = both
|
||||
|
||||
if response.match(self, line):
|
||||
|
|
Loading…
Reference in a new issue