Use a proper exception class hierarchy for SFTPClient

Bug #237638 reported by Nicolas Noirbent
2
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

Revision history for this message
Robey Pointer (robey) wrote :

sounds fine to me.

Changed in paramiko:
assignee: nobody → robey
importance: Undecided → Low
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.