bzr.dev fails to run selftest without paramiko
John A Meinel
john at arbash-meinel.com
Thu Jan 26 17:27:34 GMT 2006
Aaron Bentley wrote:
> What's frustrating is that I reported this problem weeks ago, as
> "selftest broken when paramiko absent."
>
> Aaron
>
Yeah, we really need to watch the bug tracker a little bit better. And
have a way to mark bugs as being 'deferred' or 'feature requests', so
that we can track down real bugs.
Right now, I think we have ~100 bugs, which takes a lot of time to find
ones that you actually care about.
Anyway, here is a functional patch, which I'm committing to my win32 branch.
Basically, this just doesn't let an import failure prevent us from
continuing. Importing sftp already prints an error, so I didn't bother
to print another one. (Especially because it prints the error about 15
times)
There are probably better ways of doing it, but this one works. And I
really want to get the win32 bugs fixed, rather than focusing on this one.
If you give me a cookie, I'll put it in jam-integration.
John
=:->
=== modified file 'bzrlib/transport/__init__.py'
--- bzrlib/transport/__init__.py
+++ bzrlib/transport/__init__.py
@@ -534,9 +534,13 @@
"""Return a list of the klass, server_factory pairs to test."""
result = []
for module in _get_transport_modules():
-
result.extend(self.get_transport_test_permutations(reduce(getattr,
- (module).split('.')[1:],
- __import__(module))))
+ try:
+
result.extend(self.get_transport_test_permutations(reduce(getattr,
+ (module).split('.')[1:],
+ __import__(module))))
+ except ImportError, e:
+ # This is most likely paramiko failing to be loaded
+ pass
return result
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060126/490cfbac/attachment.pgp
More information about the bazaar
mailing list