Prevent DeprecationWarning about logging.warn

This commit is contained in:
Eugenio Lacuesta 2019-07-13 20:34:31 -03:00
parent b714a372e2
commit c24b80e1e6
No known key found for this signature in database
GPG Key ID: DA3EF2D0913E9810
1 changed files with 4 additions and 4 deletions

View File

@ -479,10 +479,10 @@ class _ResponseReader(protocol.Protocol):
return
elif not self._fail_on_dataloss_warned:
logger.warn("Got data loss in %s. If you want to process broken "
"responses set the setting DOWNLOAD_FAIL_ON_DATALOSS = False"
" -- This message won't be shown in further requests",
self._txresponse.request.absoluteURI.decode())
logger.warning("Got data loss in %s. If you want to process broken "
"responses set the setting DOWNLOAD_FAIL_ON_DATALOSS = False"
" -- This message won't be shown in further requests",
self._txresponse.request.absoluteURI.decode())
self._fail_on_dataloss_warned = True
self._finished.errback(reason)