Use a proper exception class hierarchy for SFTPClient
Bug #237638 reported by
Nicolas Noirbent
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
paramiko |
Confirmed
|
Low
|
Robey Pointer |
Bug Description
paramiko raises IOError / EOFError when operations fail on the remote server, i.e. when using SFTPClient.chdir() on a non-existing folder. Wouldn't it be better to create SFTPIOError and SFTPEOFError and have them inherit from both SFTPError and respectively IOError / EOFError ? This way one could catch all exceptions from SFTP, or catch indiscriminately on IOError / EOFError.
In the same way, wouldn't it be logical for SFTPError to inherit from SSHException ?
Both of these changes seem pretty painless to me, and wouldn't break existing applications using paramiko. I can write a patch for this myself if you'd consider inlcuding it in trunk.
Cheers
To post a comment you must log in.
sounds fine to me.