~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/http_server.py

  • Committer: Vincent Ladeuil
  • Date: 2008-01-03 08:44:12 UTC
  • mto: (3156.2.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 3158.
  • Revision ID: v.ladeuil+lp@free.fr-20080103084412-5bjr40bt0hbqorbk
Review feeback.

* bzrlib/tests/test_http.py:
(TestSpecificRequestHandler): Typo in doc string.

* bzrlib/tests/http_server.py:
(TestingHTTPServerMixin.tearDown): Mentioned by Aaron for win32.

Show diffs side-by-side

added added

removed removed

Lines of Context:
344
344
         # that since the server is in a blocking operation and since python
345
345
         # use select internally, shutting down the socket is reliable and
346
346
         # relatively clean.
347
 
         self.socket.shutdown(socket.SHUT_RDWR)
 
347
         try:
 
348
             self.socket.shutdown(socket.SHUT_RDWR)
 
349
         except socket.error, e:
 
350
             # WSAENOTCONN (10057) 'Socket is not connected' is harmless on
 
351
             # windows (occurs before the first connection attempt
 
352
             # vila--20071230)
 
353
             if not len(e.args) or e.args[0] != 10057:
 
354
                 raise
348
355
         # Let the server properly close the socket
349
356
         self.server_close()
350
357