Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
mxschmitt committed Jul 28, 2021
1 parent aeb07d1 commit 42d786a
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions playwright/_impl/_wait_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,9 @@ def _wait_for_event_info_before(self, wait_id: str, event: str) -> None:
},
)

async def _wait_for_event_info_after(
self, wait_id: str, error: Exception = None
) -> None:
def _wait_for_event_info_after(self, wait_id: str, error: Exception = None) -> None:
try:
await self._channel.send(
self._channel.send_no_reply(
"waitForEventInfo",
{
"info": {
Expand Down Expand Up @@ -97,15 +95,13 @@ def _fulfill(self, result: Any) -> None:
self._cleanup()
if not self._result.done():
self._result.set_result(result)
self._loop.create_task(self._wait_for_event_info_after(self._wait_id))
self._wait_for_event_info_after(self._wait_id)

def _reject(self, exception: Exception) -> None:
self._cleanup()
if not self._result.done():
self._result.set_exception(exception)
self._loop.create_task(
self._wait_for_event_info_after(self._wait_id, exception)
)
self._wait_for_event_info_after(self._wait_id, exception)

def wait_for_event(
self,
Expand Down

0 comments on commit 42d786a

Please sign in to comment.