From: Mukund Sivaraman Date: Sun, 20 Jan 2013 20:15:26 +0000 (+0530) Subject: [2623] Fix test failures in msgq_test.py under Python 3.3 X-Git-Tag: bind10-1.0.0-rc-release~76^2~6^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a33bc3ac5aa1fd9e9532b08d9622530c2b5998b;p=thirdparty%2Fkea.git [2623] Fix test failures in msgq_test.py under Python 3.3 --- diff --git a/src/bin/msgq/tests/msgq_test.py b/src/bin/msgq/tests/msgq_test.py index 00e15d88b3..88bb02219a 100644 --- a/src/bin/msgq/tests/msgq_test.py +++ b/src/bin/msgq/tests/msgq_test.py @@ -454,9 +454,8 @@ class SendNonblock(unittest.TestCase): Two tests are done: one where the error is raised on the 3rd octet, and one on the 23rd. """ - sockerr = socket.error for err in [ errno.EAGAIN, errno.EWOULDBLOCK, errno.EINTR ]: - sockerr.errno = err + sockerr = socket.error(err, 'Socket error') self.do_send_with_send_error(3, sockerr) self.do_send_with_send_error(23, sockerr) @@ -467,9 +466,8 @@ class SendNonblock(unittest.TestCase): Two tests are done: one where the error is raised on the 3rd octet, and one on the 23rd. """ - sockerr = socket.error for err in [ errno.EPIPE, errno.ENOBUFS, errno.ECONNRESET ]: - sockerr.errno = err + sockerr = socket.error(err, 'Socket error') self.do_send_with_send_error(3, sockerr, False) self.do_send_with_send_error(23, sockerr, False)