Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

Unnecessary update when value is None

Jactyb5684909d1cb
diff --git a/scrapy/settings/__init__.py b/scrapy/settings/__init__.py
index b9a13c018..f28fbfaf9 100644
--- a/scrapy/settings/__init__.py
+++ b/scrapy/settings/__init__.py
@@ -83,7 +83,8 @@ class BaseSettings(MutableMapping):
def __init__(self, values=None, priority='project'):
self.frozen = False
self.attributes = {}
- self.update(values, priority)
+ if values is not None:
+ self.update(values, priority)
def __getitem__(self, opt_name):
if opt_name not in self: