summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlli Salli <olli.salli@collabora.co.uk>2012-02-21 17:55:55 (GMT)
committerOlli Salli <olli.salli@collabora.co.uk>2012-02-21 17:55:55 (GMT)
commit4e94a954362adb866ca270d1299c691f36e20c67 (patch)
tree83655320e5060e8e57daa930731639ea414df4cf
parentb552f83134d21bd9b618f25f6e9d6e18e22dbbda (diff)
downloadtelepathy-salut-4e94a954362adb866ca270d1299c691f36e20c67.tar.gz
telepathy-salut-4e94a954362adb866ca270d1299c691f36e20c67.tar.xz
receive-file-ipv6 test: Don't even try to listen if IPv6 is disabled
Because that just threw up for me.
-rw-r--r--tests/twisted/avahi/file-transfer/receive-file-ipv6.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/twisted/avahi/file-transfer/receive-file-ipv6.py b/tests/twisted/avahi/file-transfer/receive-file-ipv6.py
index a525db0..93d0d1d 100644
--- a/tests/twisted/avahi/file-transfer/receive-file-ipv6.py
+++ b/tests/twisted/avahi/file-transfer/receive-file-ipv6.py
@@ -20,6 +20,10 @@ class TestReceiveFileIPv6(ReceiveFileTest):
metadata = {}
def announce_contact(self, name=CONTACT_NAME):
+ if not check_ipv6_enabled():
+ print "Skipped test as IPv6 doesn't seem to be available"
+ return True
+
basic_txt = { "txtvers": "1", "status": "avail" }
self.contact_name = '%s@%s' % (name, get_host_name())
@@ -28,10 +32,6 @@ class TestReceiveFileIPv6(ReceiveFileTest):
self.contact_service = AvahiAnnouncer(self.contact_name, "_presence._tcp", port,
basic_txt, proto=avahi.PROTO_INET6)
- if not check_ipv6_enabled():
- print "Skipped test as IPv6 doesn't seem to be available"
- return True
-
def _resolve_salut_presence(self):
AvahiListener(self.q).listen_for_service("_presence._tcp")
e = self.q.expect('service-added', name = self.self_handle_name,