File tree Expand file tree Collapse file tree 3 files changed +3
-22
lines changed Expand file tree Collapse file tree 3 files changed +3
-22
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ disable=
1313 unused-argument,
1414 # tests
1515 abstract-method,
16- bare-except,
1716 duplicate-code,
1817 import-outside-toplevel,
1918 inconsistent-return-statements,
Original file line number Diff line number Diff line change 1- from contextlib import asynccontextmanager
1+ from contextlib import asynccontextmanager , suppress
22
33from scrapy .utils .test import get_crawler
44
@@ -10,11 +10,7 @@ async def make_handler(settings_dict: dict):
1010
1111 crawler = get_crawler (settings_dict = settings_dict )
1212 handler = ScrapyPlaywrightDownloadHandler (crawler = crawler )
13- try :
13+ with suppress ( Exception ) :
1414 await handler ._launch_browser ()
15- except : # noqa (E722)
16- pass
17- else :
1815 yield handler
19- finally :
20- await handler ._close ()
16+ await handler ._close ()
You can’t perform that action at this time.
0 commit comments