Skip to content

Commit 9c15851

Browse files
alexcepoidangra
authored andcommitted
fix a possible error in contracts post hook
1 parent ab74482 commit 9c15851

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scrapy/contracts/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ def add_post_hook(self, request, results):
9999

100100
@wraps(cb)
101101
def wrapper(response):
102+
output = list(iterate_spider_output(cb(response)))
102103
try:
103-
output = list(iterate_spider_output(cb(response)))
104104
results.startTest(self.testcase_post)
105105
self.post_process(output)
106106
results.stopTest(self.testcase_post)

0 commit comments

Comments
 (0)