diff options
author | Yen Chi Hsuan | 2016-11-26 16:54:54 +0800 |
---|---|---|
committer | Yen Chi Hsuan | 2016-11-26 16:54:54 +0800 |
commit | 1c6a8f1454e056f686aeffbe6018653471c82624 (patch) | |
tree | f7516b449e2f0c906642fe84b7132c5efe445179 /python-2.6-socket-test.patch | |
parent | ebb44c7c72f4197a6bc7621b168f2e958db8464d (diff) | |
download | aur-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.patch | 15 |
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) + |