~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/HttpServer.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-09-20 12:50:23 UTC
  • mfrom: (2838.1.1 bzr.integration)
  • Revision ID: pqm@pqm.ubuntu.com-20070920125023-upjqmzln7mjtvj1h
Remove some more http related noise from test suite output

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
    def handle_one_request(self):
61
61
        """Handle a single HTTP request.
62
62
 
 
63
        We catch all socket errors occurring when the client close the
 
64
        connection early to avoid polluting the test results.
 
65
        """
 
66
        try:
 
67
            self._handle_one_request()
 
68
        except socket.error, e:
 
69
            if (len(e.args) > 0
 
70
                and e.args[0] in (errno.EPIPE, errno.ECONNRESET,
 
71
                                  errno.ECONNABORTED,)):
 
72
                self.close_connection = 1
 
73
                pass
 
74
            else:
 
75
                raise
 
76
 
 
77
    def _handle_one_request(self):
 
78
        """
 
79
        Request handling as defined in the base class.
 
80
 
63
81
        You normally don't need to override this method; see the class
64
82
        __doc__ string for information on how to handle specific HTTP
65
83
        commands such as GET and POST.
66
84
 
 
85
        On some platforms, notably OS X, a lot of EAGAIN (resource temporary
 
86
        unavailable) occur. We retry silently at most 10 times.
67
87
        """
68
88
        for i in xrange(1,11): # Don't try more than 10 times
69
89
            try: