aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework/netutil.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/test_framework/netutil.py')
-rw-r--r--test/functional/test_framework/netutil.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/functional/test_framework/netutil.py b/test/functional/test_framework/netutil.py
index 30a4a58d6f..08d41fe97f 100644
--- a/test/functional/test_framework/netutil.py
+++ b/test/functional/test_framework/netutil.py
@@ -158,3 +158,12 @@ def test_ipv6_local():
except socket.error:
have_ipv6 = False
return have_ipv6
+
+def test_unix_socket():
+ '''Return True if UNIX sockets are available on this platform.'''
+ try:
+ socket.AF_UNIX
+ except AttributeError:
+ return False
+ else:
+ return True