Skip to content

Commit a670a97

Browse files
committed
Fix default value of driver_arguments
`driver_arguments` is a list. With this patch, if `SELENIUM_DRIVER_ARGUMENTS` is unset the default value is an empty list instead of `None`.
1 parent 2e557f6 commit a670a97

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scrapy_selenium/middlewares.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def from_crawler(cls, crawler):
7373
driver_executable_path = crawler.settings.get('SELENIUM_DRIVER_EXECUTABLE_PATH')
7474
browser_executable_path = crawler.settings.get('SELENIUM_BROWSER_EXECUTABLE_PATH')
7575
command_executor = crawler.settings.get('SELENIUM_COMMAND_EXECUTOR')
76-
driver_arguments = crawler.settings.get('SELENIUM_DRIVER_ARGUMENTS')
76+
driver_arguments = crawler.settings.get('SELENIUM_DRIVER_ARGUMENTS', [])
7777

7878
if driver_name is None:
7979
raise NotConfigured('SELENIUM_DRIVER_NAME must be set')

0 commit comments

Comments
 (0)