worker: fix possibly-unbound status code

We assigned this inside an exception handler, and allow
processing to continue on after catching the exception.
This commit is contained in:
Misty De Méo 2025-06-25 15:37:49 -07:00 committed by Misty De Méo
parent d33df40283
commit 70e4c3d7f6

View file

@ -339,6 +339,7 @@ class BrozzlerWorker:
raise brozzler.PageConnectionError()
except brozzler.PageInterstitialShown:
page_logger.info("page interstitial shown (http auth)")
status_code = -1
if enable_youtube_dl and self.should_ytdlp(
page_logger, site, page, status_code