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):