[Python-3000-checkins] r61833 - python/branches/py3k/Lib/test/test_xmlrpc_net.py
neal.norwitz
python-3000-checkins at python.org
Mon Mar 24 06:51:45 CET 2008
Author: neal.norwitz
Date: Mon Mar 24 06:51:45 2008
New Revision: 61833
Modified:
python/branches/py3k/Lib/test/test_xmlrpc_net.py
Log:
Skip test if socket gets reset, the problem is on the other side.
Modified: python/branches/py3k/Lib/test/test_xmlrpc_net.py
==============================================================================
--- python/branches/py3k/Lib/test/test_xmlrpc_net.py (original)
+++ python/branches/py3k/Lib/test/test_xmlrpc_net.py Mon Mar 24 06:51:45 2008
@@ -1,5 +1,8 @@
#!/usr/bin/env python
+import errno
+import socket
+import sys
import unittest
from test import test_support
@@ -11,7 +14,14 @@
# Get the current time from xmlrpc.com. This code exercises
# the minimal HTTP functionality in xmlrpclib.
server = xmlrpclib.ServerProxy("http://time.xmlrpc.com/RPC2")
- t0 = server.currentTime.getCurrentTime()
+ try:
+ t0 = server.currentTime.getCurrentTime()
+ except socket.error as e:
+ if e.errno != errno.ECONNRESET:
+ raise
+ print(" test_current_time: socket got reset, skipping test",
+ file=sys.stderr)
+ return
# Perform a minimal sanity check on the result, just to be sure
# the request means what we think it means.
More information about the Python-3000-checkins
mailing list