Skip to content

Commit

Permalink
Non mutable default in Spider.custom_settings
Browse files Browse the repository at this point in the history
  • Loading branch information
curita authored and dangra committed Sep 2, 2014
1 parent 16e62e9 commit 77bd26a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scrapy/spider.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Spider(object_ref):
"""

name = None
custom_settings = {}
custom_settings = None

def __init__(self, name=None, **kwargs):
if name is not None:
Expand Down Expand Up @@ -69,7 +69,7 @@ def parse(self, response):

@classmethod
def update_settings(cls, settings):
settings.setdict(cls.custom_settings, priority='spider')
settings.setdict(cls.custom_settings or {}, priority='spider')

@classmethod
def handles_request(cls, request):
Expand Down

0 comments on commit 77bd26a

Please sign in to comment.