Merge lp:~mnn282/bzr/sftp-unsupported-operation-more-info into lp:bzr
Status: | Needs review |
---|---|
Proposed branch: | lp:~mnn282/bzr/sftp-unsupported-operation-more-info |
Merge into: | lp:bzr |
Diff against target: |
218 lines (+70/-15) 4 files modified
bzrlib/errors.py (+10/-0) bzrlib/tests/test_sftp_transport.py (+37/-0) bzrlib/transport/__init__.py (+5/-4) bzrlib/transport/sftp.py (+18/-11) |
To merge this branch: | bzr merge lp:~mnn282/bzr/sftp-unsupported-operation-more-info |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Martin Packman (community) | Needs Fixing | ||
Review via email: mp+116849@code.launchpad.net |
Description of the change
Unsupported operations now have more information in SFTP transport.
Unmerged revisions
- 6547. By mnn
-
- SFTPTransport.
_translate_ io_exception changed to @classmethod
- changed TransportOperationNotSupported .message to description - 6546. By mnn
-
Moved handling of unsupported operations into SFTPTransport.
_translate_ io_exception, which has now optional argument 'operation' SFTPTransport.
_translate_ io_exception and Transport. _translate_ error are now static methods - 6545. By mnn
-
Display more information for TransportOperat
ionNotSupported (for rename - path from and path to) - 6544. By mnn
-
Unsupported operations now have more information in SFTP transport
- stubs for unsupported transport operations (TransportOpera
tionNotSupporte d) - used by rename operations in SFTP transport
Idea of adding a new exception here seems reasonable.
You'll want to add it inside _translate_ io_exception rather than adding a special separate branch before hand. That might mean tweaking that method a little, but it's private so there's no reason to to adapt it.
You want some tests as well, you can probably just test the translation itself rather than trying to fake out paramiko to raise the exception you're observing.