With the previous code, a 404 or other HTTP error would result in:
Traceback (most recent call last):
File "", line 1, in
File "dload.py", line 16, in download_urls
exception_handler=exception_handler):
File "/app/lib/python2.7/site-packages/grequests.py", line 148, in imap
exception_handler(request, request.exception)
AttributeError: 'AsyncRequest' object has no attribute 'exception'
This is because gevent didn't store the exception in the request because an HTTP error does not cause an exception. We're in this case though because request.response evaluates to False if the Response was an HTTP error.
Also, can we get a release soon? Version 0.20 is kinda lacking without connection error handling. Thanks.
With the previous code, a 404 or other HTTP error would result in:
Traceback (most recent call last): File "", line 1, in
File "dload.py", line 16, in download_urls
exception_handler=exception_handler):
File "/app/lib/python2.7/site-packages/grequests.py", line 148, in imap
exception_handler(request, request.exception)
AttributeError: 'AsyncRequest' object has no attribute 'exception'
This is because gevent didn't store the exception in the request because an HTTP error does not cause an exception. We're in this case though because request.response evaluates to False if the Response was an HTTP error.
Also, can we get a release soon? Version 0.20 is kinda lacking without connection error handling. Thanks.