mirror of https://github.com/scrapy/scrapy.git
Unnecessary update when value is None
When value is None, it is not necessary to invoke update and run other methods and conditions to make the code complicated there.
This commit is contained in:
parent
794ab19660
commit
b5684909d1
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue