Issue1509404
Created on 2006年06月20日 15:57 by brett.cannon, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Files |
| File name |
Uploaded |
Description |
Edit |
|
test_socket_ssl.diff
|
brett.cannon,
2006年06月20日 15:57
|
prevent socket connection refusal from causing test failure |
| Messages (5) |
|
msg50513 - (view) |
Author: Brett Cannon (brett.cannon) * (Python committer) |
Date: 2006年06月20日 15:57 |
When a socket connection is refused, it isn't a failure
of the test, it could just be network issues or the
site that we are trying to connect to (we really need
to point all tests to python.org but I don't know if we
has SSL set up).
The attached patch catches socket.error and checks if
it is because of a connection refusal (based on its
errno). If that is the case, the test to returns,
otherwise the exception is re-raised.
|
|
msg50514 - (view) |
Author: Georg Brandl (georg.brandl) * (Python committer) |
Date: 2006年06月20日 16:13 |
Logged In: YES
user_id=849994
I'd say this is the right thing to do.
|
|
msg50515 - (view) |
Author: Brett Cannon (brett.cannon) * (Python committer) |
Date: 2006年06月20日 17:31 |
Logged In: YES
user_id=357491
One vote of confidence is enough for me!
Modified to raise TestSkipped instead of a bare return.
Committed in rev. 47047.
|
|
msg50516 - (view) |
Author: Brett Cannon (brett.cannon) * (Python committer) |
Date: 2006年06月20日 22:00 |
Logged In: YES
user_id=357491
Well, even after a change for a typo (left off the 'or'
suffix on "error"), it still didn't work; see
http://www.python.org/dev/buildbot/trunk/S-390%20Debian%20trunk/builds/181/step-test/0
. I think that unfortunately, as it stands, when at the C
level something is raised using PyErr_SetObject() the value
argument is assigned to args, using *args, not to message.
|
|
msg50517 - (view) |
Author: Brett Cannon (brett.cannon) * (Python committer) |
Date: 2006年06月21日 19:32 |
Logged In: YES
user_id=357491
rev. 47053 has the change to get the errno out of
exc.argx[0]. Also changed back to a bare return but also
prints out why the test was skipped.
|
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2022年04月11日 14:56:18 | admin | set | github: 43531 |
| 2006年06月20日 15:57:39 | brett.cannon | create |