flags2_asyncio with closing rehttp response

This commit is contained in:
Luciano Ramalho
2015-07-14 00:22:05 -03:00
parent 333615d051
commit 56094ef0f0
2 changed files with 6 additions and 8 deletions

View File

@@ -81,16 +81,14 @@ def downloader_coro(cc_list, base_url, verbose, concur_req):
error_msg = exc.__cause__.args[0]
except IndexError:
error_msg = exc.__cause__.__class__.__name__
if verbose and error_msg:
msg = '*** Error for {}: {}'
print(msg.format(country_code, error_msg))
status = HTTPStatus.error
else:
error_msg = ''
status = res.status
if error_msg:
status = HTTPStatus.error
counter[status] += 1
if verbose and error_msg:
msg = '*** Error for {}: {}'
print(msg.format(country_code, error_msg))
return counter