[telepathy-gabble/master] wait_bytestream_open: don't assert if a relay is present in S5B offer
Guillaume Desmottes
guillaume.desmottes at collabora.co.uk
Fri Apr 3 08:41:31 PDT 2009
---
tests/twisted/bytestream.py | 16 +++++++---------
1 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/tests/twisted/bytestream.py b/tests/twisted/bytestream.py
index b9e8344..cb9caf6 100644
--- a/tests/twisted/bytestream.py
+++ b/tests/twisted/bytestream.py
@@ -296,18 +296,16 @@ class BytestreamS5B(Bytestream):
def wait_bytestream_open(self):
id, mode, sid, hosts = self._expect_socks5_init()
- for jid, host, port in hosts:
- assert jid == self.initiator, jid
-
assert mode == 'tcp'
assert sid == self.stream_id
- jid, host, port = hosts[0]
- if self._socks5_connect(host, port):
- self._send_socks5_reply(id, jid)
- else:
- # Connection failed
- self.send_not_found(id)
+ for jid, host, port in hosts:
+ if jid == self.initiator:
+ if self._socks5_connect(host, port):
+ self._send_socks5_reply(id, jid)
+ else:
+ # Connection failed
+ self.send_not_found(id)
def get_data(self, size=0):
binary = ''
--
1.5.6.5
More information about the telepathy-commits
mailing list