mirror of
https://github.com/scrapy/scrapy.git
synced 2025-02-22 00:53:24 +00:00
[logformatter] backward compat comments
This commit is contained in:
parent
0f2a5cdb8e
commit
4345eaf1b6
@ -43,6 +43,7 @@ class LogFormatter(object):
|
||||
'request_flags' : request_flags,
|
||||
'referer': referer_str(request),
|
||||
'response_flags': response_flags,
|
||||
# backward compatibility with Scrapy logformatter below 1.4 version
|
||||
'flags': response_flags
|
||||
}
|
||||
}
|
||||
|
@ -66,7 +66,6 @@ class LoggingContribTest(unittest.TestCase):
|
||||
|
||||
|
||||
class LogFormatterSubclass(LogFormatter):
|
||||
# Formatter with format spec that is same as in Scrapy before 1.3 version.
|
||||
def crawled(self, request, response, spider):
|
||||
kwargs = super(LogFormatterSubclass, self).crawled(
|
||||
request, response, spider)
|
||||
@ -82,7 +81,6 @@ class LogFormatterSubclass(LogFormatter):
|
||||
|
||||
|
||||
class LogformatterSubclassTest(LoggingContribTest):
|
||||
# Test if old crawledmsg format string still works fine
|
||||
def setUp(self):
|
||||
self.formatter = LogFormatterSubclass()
|
||||
self.spider = Spider('default')
|
||||
|
Loading…
x
Reference in New Issue
Block a user