~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/__init__.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-07-27 03:03:49 UTC
  • mfrom: (6015.3.7 trivial)
  • Revision ID: pqm@pqm.ubuntu.com-20110727030349-wcq2ay0knn995ae4
(mbp) log a message when we get a EINVAL on a transport operation (Martin
 Pool)

Show diffs side-by-side

added added

removed removed

Lines of Context:
294
294
        This handles things like ENOENT, ENOTDIR, EEXIST, and EACCESS
295
295
        """
296
296
        if getattr(e, 'errno', None) is not None:
297
 
            if e.errno in (errno.ENOENT, errno.ENOTDIR, errno.EINVAL):
 
297
            if e.errno in (errno.ENOENT, errno.ENOTDIR):
 
298
                raise errors.NoSuchFile(path, extra=e)
 
299
            elif e.errno == errno.EINVAL:
 
300
                mutter("EINVAL returned on path %s: %s" % (path, e))
298
301
                raise errors.NoSuchFile(path, extra=e)
299
302
            # I would rather use errno.EFOO, but there doesn't seem to be
300
303
            # any matching for 267