From 644ec6f964e903e5706f8a4af4d0d888f97feedd Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Wed, 3 Jul 2024 21:37:05 -0300 Subject: [PATCH] make test for playwright more robust #791 --- aider/scrape.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/aider/scrape.py b/aider/scrape.py index 0ed64fc4c..0d5081726 100755 --- a/aider/scrape.py +++ b/aider/scrape.py @@ -91,12 +91,12 @@ class Scraper: if self.playwright_available is not None: return - with sync_playwright() as p: - try: + try: + with sync_playwright() as p: p.chromium.launch() self.playwright_available = True - except Exception: - self.playwright_available = False + except Exception: + self.playwright_available = False def get_playwright_instructions(self): if self.playwright_available in (True, None):