summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorOlli Salli <olli.salli@collabora.co.uk>2012-02-21 19:45:31 +0200
committerOlli Salli <olli.salli@collabora.co.uk>2012-02-21 19:45:31 +0200
commitb552f83134d21bd9b618f25f6e9d6e18e22dbbda (patch)
treebc5fec0d6a150509236e456e959683266dd29218 /tests
parent0de0f8560b993b69be80f1b12eb4731a0bcd73f0 (diff)
downloadtelepathy-salut-b552f83134d21bd9b618f25f6e9d6e18e22dbbda.tar.gz
Fix IPv6 enabled check in avahitest.py
With my IPv4-only system, already the socket() call fails with EAFNOSUPPORT. So that should be inside the try: section as well
Diffstat (limited to 'tests')
-rw-r--r--tests/twisted/avahitest.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/twisted/avahitest.py b/tests/twisted/avahitest.py
index eb68504c..0b9ebaf5 100644
--- a/tests/twisted/avahitest.py
+++ b/tests/twisted/avahitest.py
@@ -190,9 +190,8 @@ class AvahiAnnouncer:
self.entry.Free()
def check_ipv6_enabled():
- s = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
-
try:
+ s = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
s.bind(('::1', 0))
except socket.error:
return False