Author martin.panter
Recipients martin.panter
Date 2016-01-21.10:46:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In bad_cert_test(), there are two OSError exception handler; one masking the other. In Python 3, I think we should remove the second (dead) handler. In Python 2, maybe the first OSError handler should catch socket.error instead.

Originally, in r80534, socket.error was caught and ignored, with the vague explanation “socket.error can really happen here”. Then revision 9297974604ff added an IOError handler, presumably to catch ENOENT for test_nonexisting_cert().

Later, in revisions 50d19c2fac82 and 9297974604ff, socket.error and IOError were both changed to OSError. I guess in Python 3 we should just catch all OSError exceptions and remove the second handler that only wants ENOENT.

In Python 2, there was a large backport of SSL functionality in revision 221a1f9155e2 (Issue 21308). It seems to have brought too much of the OSError alias changes with it. This is probably the cause of the following 2.7 builtbot failure:
ERROR: test_nonexisting_cert (test.test_ssl.ThreadedTests)
Connecting with a non-existing cert file
Traceback (most recent call last):
  File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\test\", line 2153, in test_nonexisting_cert
  File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\test\", line 1889, in bad_cert_test
    s.connect((HOST, server.port))
  File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\", line 844, in connect
    self._real_connect(addr, False)
  File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\", line 835, in _real_connect
  File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\", line 808, in do_handshake
error: [Errno 10054] An existing connection was forcibly closed by the remote host

Errno 10054 is apparently ECONNRESET.
Date User Action Args
2016-01-21 10:46:23martin.pantersetrecipients: + martin.panter
2016-01-21 10:46:23martin.pantersetmessageid: <>
2016-01-21 10:46:23martin.panterlinkissue26173 messages
2016-01-21 10:46:23martin.pantercreate