fix no exist browser log error (#1104)

This commit is contained in:
LawyZheng
2024-11-01 21:40:09 +08:00
committed by GitHub
parent f9b7df8efc
commit 5365d0cc56

View File

@@ -178,6 +178,9 @@ class BrowserArtifacts(BaseModel):
return b""
async with self._browser_console_log_lock:
if not os.path.exists(self.browser_console_log_path):
return b""
async with aiofiles.open(self.browser_console_log_path, "rb") as f:
return await f.read()