kennethreitz/requests — Issue #312: Unhandled exception on timeout in safe_mode
Author: gazpachoking
Created: 2011-12-20 03:28:28+00:00
State: open

In safe_mode is specified, and a timeout occurs, the following error is raised:
```>>> a = requests.get('http://timeout.com', timeout=0.01, config=dict(safe_mode=True))
Traceback (most recent call last):
File "", line 1, in
File "build\bdist.win32\egg\requests\api.py", line 79, in get
File "build\bdist.win32\egg\requests\api.py", line 66, in request
File "build\bdist.win32\egg\requests\sessions.py", line 191, in request
File "build\bdist.win32\egg\requests\models.py", line 468, in send
UnboundLocalError: local variable 'r' referenced before assignment
```