kennethreitz/grequests — pull request #59 by realgam3 (2014-07-12 15:48:33+00:00)
Title: [fix] exception handling

When i tried to use exception handler i got this exception:
Process Process-1:
Traceback (most recent call last):
File "C:\Develop\Python27\lib\multiprocessing\process.py", line 258, in _bootstrap
self.run()
File "C:\Develop\Python27\lib\multiprocessing\process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\TzAnAnY\GitProjects\AutoBrowser\nmap\nmap.py", line 149, in scan_progressive
callback(host, scan_data)
File "C:\Users\TzAnAnY\GitProjects\AutoBrowser\autoBrowsers.py", line 55, in callback_result
get_async_results('http', host, ports)
File "C:\Users\TzAnAnY\GitProjects\AutoBrowser\autoBrowsers.py", line 42, in get_async_results
exception_handler=exception_handler,
File "C:\Users\TzAnAnY\GitProjects\AutoBrowser\grequests.py", line 124, in map
exception_handler(request, request.exception)
AttributeError: 'AsyncRequest' object has no attribute 'exception'

So i add hasattr(request, 'exception') to check that this attribute exist....