latent bug in "hello"
John Arbash Meinel
john at arbash-meinel.com
Wed Aug 27 16:01:39 BST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I wrote a plugin which just connects to a remote server and issues a bunch of
"hello" requests. I use it to time connection latency and message latency.
With bzr.dev (and probably bzr.1.6) it fails with:
File "/home/jameinel/dev/bzr/bzr.dev/bzrlib/smart/client.py", line 55, in
_call_and_read_response
if self._medium._protocol_version is not None:
AttributeError: '_SharedConnection' object has no attribute '_protocol_version'
(This is over bzr+ssh://).
It turns out that I was using "get_shared_medium()" rather than
"get_smart_medium()". With the difference being:
def get_smart_medium(self):
return self._get_connection()
@deprecated_method(one_four)
def get_shared_medium(self):
return self._get_shared_connection()
And "_get_connection" is defined as:
return self._shared_connection.connection
I realize the method is deprecated, but it seems to be returning the wrong
object. Is that true?
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFItWxTJdeBCYSNAAMRAn7iAJwKsbXbHKDvmrh61+FCWcE50YGntQCcCfcc
qjQWUyuSWS7lD3ykACAnM7o=
=l0zp
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list