~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/__init__.py

  • Committer: John Arbash Meinel
  • Date: 2005-12-16 04:42:07 UTC
  • mto: (1185.50.19 bzr-jam-integration)
  • mto: This revision was merged to the branch mainline in revision 1532.
  • Revision ID: john@arbash-meinel.com-20051216044207-b1fdf835d8432d3f
Updating for new transport tests so that they pass on win32

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
from bzrlib.trace import mutter
23
23
import bzrlib.errors as errors
24
24
import errno
 
25
import sys
25
26
 
26
27
_protocol_handlers = {
27
28
}
63
64
        if hasattr(e, 'errno'):
64
65
            if e.errno in (errno.ENOENT, errno.ENOTDIR):
65
66
                raise errors.NoSuchFile(path, extra=e)
 
67
            # I would rather use errno.EFOO, but there doesn't seem to be
 
68
            # any matching for 267
 
69
            # This is the error when doing a listdir on a file:
 
70
            # WindowsError: [Errno 267] The directory name is invalid
 
71
            if sys.platform == 'win32' and e.errno in (errno.ESRCH, 267):
 
72
                raise errors.NoSuchFile(path, extra=e)
66
73
            if e.errno == errno.EEXIST:
67
74
                raise errors.FileExists(path, extra=e)
68
75
            if e.errno == errno.EACCES: