~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_server.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-09-01 06:45:57 UTC
  • mfrom: (5247.2.41 more-ignored-exceptions)
  • Revision ID: pqm@pqm.ubuntu.com-20100901064557-qsxmjmp195ozbluf
(vila) Catch EPIPE when shutting down test servers. (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
424
424
 
425
425
    def ignored_exceptions_during_shutdown(self, e):
426
426
        if sys.platform == 'win32':
427
 
            accepted_errnos = [errno.EBADF, errno.WSAEBADF, errno.WSAENOTCONN,
428
 
                               errno.WSAECONNRESET, errno.WSAESHUTDOWN]
 
427
            accepted_errnos = [errno.EBADF,
 
428
                               errno.EPIPE,
 
429
                               errno.WSAEBADF,
 
430
                               errno.WSAECONNRESET,
 
431
                               errno.WSAENOTCONN,
 
432
                               errno.WSAESHUTDOWN,
 
433
                               ]
429
434
        else:
430
 
            accepted_errnos = [errno.EBADF, errno.ENOTCONN, errno.ECONNRESET]
 
435
            accepted_errnos = [errno.EBADF,
 
436
                               errno.ECONNRESET,
 
437
                               errno.ENOTCONN,
 
438
                               errno.EPIPE,
 
439
                               ]
431
440
        if isinstance(e, socket.error) and e[0] in accepted_errnos:
432
441
            return True
433
442
        return False