next_line() doesn't need `wait_for` param

This commit is contained in:
jesopo 2020-04-05 17:22:33 +01:00
parent 423623fec1
commit d837529698
1 changed files with 2 additions and 4 deletions

View File

@ -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):