Rev 6022: (mbp) log a message when we get a EINVAL on a transport operation (Martin in file:///home/pqm/archives/thelove/bzr/2.4/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Mon Jul 25 06:53:00 UTC 2011


At file:///home/pqm/archives/thelove/bzr/2.4/

------------------------------------------------------------
revno: 6022 [merge]
revision-id: pqm at pqm.ubuntu.com-20110725065258-m3xgnqlkf35acxml
parent: pqm at pqm.ubuntu.com-20110722133320-j63csqyi585qle6a
parent: mbp at canonical.com-20110725060935-mpby5sq2xa4jyb1u
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: 2.4
timestamp: Mon 2011-07-25 06:52:58 +0000
message:
  (mbp) log a message when we get a EINVAL on a transport operation (Martin
   Pool)
modified:
  bzrlib/transport/__init__.py   transport.py-20050711165921-4978aa7ce1285ad5
=== modified file 'bzrlib/transport/__init__.py'
--- a/bzrlib/transport/__init__.py	2011-05-18 19:22:46 +0000
+++ b/bzrlib/transport/__init__.py	2011-07-25 06:09:35 +0000
@@ -298,7 +298,10 @@
         This handles things like ENOENT, ENOTDIR, EEXIST, and EACCESS
         """
         if getattr(e, 'errno', None) is not None:
-            if e.errno in (errno.ENOENT, errno.ENOTDIR, errno.EINVAL):
+            if e.errno in (errno.ENOENT, errno.ENOTDIR):
+                raise errors.NoSuchFile(path, extra=e)
+            elif e.errno == errno.EINVAL:
+                mutter("EINVAL returned on path %s: %s" % (path, e))
                 raise errors.NoSuchFile(path, extra=e)
             # I would rather use errno.EFOO, but there doesn't seem to be
             # any matching for 267




More information about the bazaar-commits mailing list