[PATCH] Allow bzr to run even if paramiko isn't installed

John A Meinel john at arbash-meinel.com
Wed Oct 19 23:48:52 BST 2005


Attached is a patch which just what the title says.
Basically, it just changes the sftp load cycle, so that if anyone
actually tries to use an sftp:// branch, it will throw a "you need
paramiko" otherwise it loads normally.

That way you get the right error message, but only when someone uses the
functionality. (Though maybe it should be a BzrCommandError so as to not
print the traceback, since it really would be considered a user request
that failed).

I realize there are more lines changed, but I converted the line endings
to unix. Normally I wouldn't, but I had to indent the entire file,
because there is no other way I know of to conditionally change the
import process (you can't "return" when you have decided things go bad).
Since most of the file changed anyway, I just changed a little bit more.

John
=:->
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: delay-sftp-error.patch
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20051019/67f37bc1/attachment.diff 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 253 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051019/67f37bc1/attachment.pgp 


More information about the bazaar mailing list