Reduce amount of lines

This commit is contained in:
Eugenio Lacuesta 2020-05-20 15:28:54 -03:00
parent 276721a5dc
commit 9514393bd1
No known key found for this signature in database
GPG Key ID: DA3EF2D0913E9810
1 changed files with 2 additions and 4 deletions

View File

@ -523,10 +523,8 @@ class _ResponseReader(protocol.Protocol):
logger.debug("Download stopped for %(request)s from signal handler %(handler)s",
{"request": self._request, "handler": handler.__qualname__})
self.transport._producer.loseConnection()
self._finish_response(
flags=["download_stopped"],
failure=result if result.value.fail else None,
)
failure = result if result.value.fail else None
self._finish_response(flags=["download_stopped"], failure=failure)
if self._maxsize and self._bytes_received > self._maxsize:
logger.error("Received (%(bytes)s) bytes larger than download "