~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/http_server.py

  • Committer: Andrew Bennetts
  • Date: 2009-12-03 05:57:41 UTC
  • mfrom: (4857 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4869.
  • Revision ID: andrew.bennetts@canonical.com-20091203055741-vmmg0fmjgjw2pwvu
MergeĀ lp:bzr.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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)