Skip to content

Commit 1882195

Browse files
committed
chore: follow up for d59301b for waitForEventInfo handling
1 parent 70d4b36 commit 1882195

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

playwright/_impl/_wait_helper.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,16 @@ def _wait_for_event_info_before(self, wait_id: str, event: str) -> None:
4747

4848
def _wait_for_event_info_after(self, wait_id: str, error: Exception = None) -> None:
4949
try:
50+
info = {
51+
"waitId": wait_id,
52+
"phase": "after",
53+
}
54+
if error:
55+
info["error"] = str(error)
5056
self._channel.send_no_reply(
5157
"waitForEventInfo",
5258
{
53-
"info": {
54-
"waitId": wait_id,
55-
"phase": "after",
56-
"error": str(error) if error else None,
57-
}
59+
"info": info,
5860
},
5961
)
6062
except Exception:

0 commit comments

Comments
 (0)