summarylogtreecommitdiffstats
path: root/python-2.6-socket-test.patch
diff options
context:
space:
mode:
authorYen Chi Hsuan2016-11-26 16:54:54 +0800
committerYen Chi Hsuan2016-11-26 16:54:54 +0800
commit1c6a8f1454e056f686aeffbe6018653471c82624 (patch)
treef7516b449e2f0c906642fe84b7132c5efe445179 /python-2.6-socket-test.patch
parentebb44c7c72f4197a6bc7621b168f2e958db8464d (diff)
downloadaur-1c6a8f1454e056f686aeffbe6018653471c82624.tar.gz
Fix test errors with testing/filesystem
Diffstat (limited to 'python-2.6-socket-test.patch')
-rw-r--r--python-2.6-socket-test.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/python-2.6-socket-test.patch b/python-2.6-socket-test.patch
new file mode 100644
index 000000000000..090a28524cd4
--- /dev/null
+++ b/python-2.6-socket-test.patch
@@ -0,0 +1,15 @@
+--- Python-2.6.9/Lib/test/test_socket.py.orig 2016-11-08 20:40:24.456911160 +0800
++++ Python-2.6.9/Lib/test/test_socket.py 2016-11-08 20:41:01.106910886 +0800
+@@ -480,7 +480,11 @@
+ # XXX(nnorwitz): http://tinyurl.com/os5jz seems to indicate
+ # it reasonable to get the host's addr in addition to 0.0.0.0.
+ # At least for eCos. This is required for the S/390 to pass.
+- my_ip_addr = socket.gethostbyname(socket.gethostname())
++ try:
++ my_ip_addr = socket.gethostbyname(socket.gethostname())
++ except socket.error:
++ # Probably name lookup wasn't set up right; skip this test
++ return
+ self.assert_(name[0] in ("0.0.0.0", my_ip_addr), '%s invalid' % name[0])
+ self.assertEqual(name[1], port)
+