~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/http_server.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-11-30 22:04:45 UTC
  • mfrom: (4789.28.4 2.1.0b4-builder-no-keys)
  • Revision ID: pqm@pqm.ubuntu.com-20091130220445-vbfmmgocbgcs195q
(jam) Update BTreeBuilder to remove ._keys and use StaticTuple

Show diffs side-by-side

added added

removed removed

Lines of Context:
462
462
                raise httplib.UnknownProtocol(proto_vers)
463
463
            else:
464
464
                self._httpd = self.create_httpd(serv_cls, rhandler)
465
 
            host, self.port = self._httpd.socket.getsockname()
 
465
            self.host, self.port = self._httpd.socket.getsockname()
466
466
        return self._httpd
467
467
 
468
468
    def _http_start(self):
494
494
            except socket.timeout:
495
495
                pass
496
496
            except (socket.error, select.error), e:
497
 
               if e[0] == errno.EBADF:
498
 
                   # Starting with python-2.6, handle_request may raise socket
499
 
                   # or select exceptions when the server is shut down (as we
500
 
                   # do).
501
 
                   pass
502
 
               else:
503
 
                   raise
 
497
                if (e[0] == errno.EBADF
 
498
                    or (sys.platform == 'win32' and e[0] == 10038)):
 
499
                    # Starting with python-2.6, handle_request may raise socket
 
500
                    # or select exceptions when the server is shut down (as we
 
501
                    # do).
 
502
                    # 10038 = WSAENOTSOCK
 
503
                    # http://msdn.microsoft.com/en-us/library/ms740668%28VS.85%29.aspx
 
504
                    pass
 
505
                else:
 
506
                    raise
504
507
 
505
508
    def _get_remote_url(self, path):
506
509
        path_parts = path.split(os.path.sep)