paramiko/paramiko — pull request #258 by bendavis78 (2014-01-30 18:11:19+00:00)
Title: Use more specific Exceptions

Changed instances of "raise Exception" to use more specific exception types (tests pass).

For example, when we want to parse a config, and handle only errors specific to config:

```python
from paramiko import config
try:
cfig = config.SSHConfig
cfig.parse(open('~/.ssh/config'))
except config.Error:
print "Error parsing config file"
except OSError:
print "Error opening file"
```

Added:

* ``paramiko._winapi.WindowsError(OSError)``
* ``paramiko.config.Error(Exception)``

Used built-in exceptions where it made sense. For example:

* ``Exception("not implemented ...")`` was replaced by ``NotImplemented("not implemented ...")``
* ``Exception("Unknown type ...") was replaced by ``ValueError("Unknown type...")``. The classes being checked by isinstance() were passed as function parameters, hence ValueError instead of TypeError.