summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2016-12-06 16:09:26 -0500
committerNat Goodspeed <nat@lindenlab.com>2016-12-06 16:09:26 -0500
commite47b178fb9d40655faa837ca32f72a78753f63fb (patch)
treebaf43fee74a8285a5900cdd80557387cc691bc4d
parent4c89e6dea0d539c9177bff7bc45e8d411efe6e5c (diff)
Try even harder to ignore errors in llcorehttp's dummy server.
-rwxr-xr-xindra/llcorehttp/tests/test_llcorehttp_peer.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/indra/llcorehttp/tests/test_llcorehttp_peer.py b/indra/llcorehttp/tests/test_llcorehttp_peer.py
index 6c5f37d407..a4783c42f2 100755
--- a/indra/llcorehttp/tests/test_llcorehttp_peer.py
+++ b/indra/llcorehttp/tests/test_llcorehttp_peer.py
@@ -280,10 +280,16 @@ class Server(ThreadingMixIn, HTTPServer):
# default behavior which *shouldn't* cause the program to return
# a failure status.
def handle_error(self, request, client_address):
- print '-'*40
- print 'Ignoring exception during processing of request from',
- print client_address
- print '-'*40
+ print >>sys.stderr, '-'*40
+ print >>sys.stderr, 'Ignoring exception during processing of request from', client_address
+ print >>sys.stderr, '-'*40
+
+ def shutdown_request(self, *args, **kwds):
+ try:
+ # just forward to base-class method, but wrap in try/except
+ HTTPServer.shutdown_request(*args, **kwds)
+ except Exception as err:
+ print >>sys.stderr, "Once more ignoring: %s" % err
if __name__ == "__main__":
do_valgrind = False