kennethreitz/envoy — pull request #36 by adammck (2012-06-08 10:00:19+00:00)
Title: Fix ConnectedCommand.status_code

Calling `status_code` on a `ConnectedCommand` which has not finished should return `None`, but it currently raises. This pull request fixes that.

### Before

```
>>> c = envoy.connect("sleep 5")
>>> repr(c.status_code)
Traceback (most recent call last):
File "", line 1, in
File "envoy/core.py", line 87, in status_code
if self._status_code is not None:
AttributeError: 'ConnectedCommand' object has no attribute '_status_code'
```

### After

```
>>> c = envoy.connect("sleep 5")
>>> repr(c.status_code)
'None'
```