diff --git a/grequests.py b/grequests.py index 582cffb..0ceab0f 100755 --- a/grequests.py +++ b/grequests.py @@ -123,6 +123,8 @@ def map(requests, stream=False, size=None, exception_handler=None, gtimeout=None ret.append(request.response) elif exception_handler and hasattr(request, 'exception'): ret.append(exception_handler(request, request.exception)) + elif exception_handler and not hasattr(request, 'exception'): + ret.append(exception_handler(request, None)) else: ret.append(None)