Remove single-use variable

This commit is contained in:
Eugenio Lacuesta 2020-03-11 20:41:59 -03:00
parent 91a78eef3e
commit 1785095707
No known key found for this signature in database
GPG Key ID: DA3EF2D0913E9810
1 changed files with 1 additions and 2 deletions

View File

@ -426,12 +426,11 @@ class ScrapyAgent(object):
return d
def _cb_bodydone(self, result, request, url):
status = int(result["txresponse"].code)
headers = Headers(result["txresponse"].headers.getAllRawHeaders())
respcls = responsetypes.from_args(headers=headers, url=url, body=result["body"])
return respcls(
url=url,
status=status,
status=int(result["txresponse"].code),
headers=headers,
body=result["body"],
flags=result["flags"],