This commit is contained in:
João Neves 2025-04-14 14:27:08 -03:00 committed by GitHub
commit 8959f9e4cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -302,7 +302,11 @@ async def async_attach_vd(
_close = browser.close
async def new_close(*args: Any, **kwargs: Any):
try:
await _close(*args, **kwargs)
except Exception:
raise
finally:
if virtual_display:
virtual_display.kill()
@ -324,7 +328,11 @@ def sync_attach_vd(
_close = browser.close
def new_close(*args: Any, **kwargs: Any):
try:
_close(*args, **kwargs)
except Exception:
raise
finally:
if virtual_display:
virtual_display.kill()