Skip to content

Commit

Permalink
call exception handler even if there's no exception attribute (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
Germey authored Apr 2, 2020
1 parent 565144d commit 698fac9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions grequests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 698fac9

Please sign in to comment.