Rev 2809: Transport.ensure_base should ignore PermissionDenied when trying to create the directory (Axel Kollmorgen) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Mon Sep 10 11:57:45 BST 2007


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 2809
revision-id: pqm at pqm.ubuntu.com-20070910105743-72rhm2629qiijbsj
parent: pqm at pqm.ubuntu.com-20070910100551-cw3iuntfi1kwj8jg
parent: mbp at sourcefrog.net-20070910092754-v85j56whbxh75acb
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2007-09-10 11:57:43 +0100
message:
  Transport.ensure_base should ignore PermissionDenied when trying to create the directory (Axel Kollmorgen)
modified:
  bzrlib/transport/__init__.py   transport.py-20050711165921-4978aa7ce1285ad5
    ------------------------------------------------------------
    revno: 2805.3.1
    merged: mbp at sourcefrog.net-20070910092754-v85j56whbxh75acb
    parent: pqm at pqm.ubuntu.com-20070907145828-hjh5941jv7y8d9z8
    committer: Martin Pool <mbp at sourcefrog.net>
    branch nick: integration
    timestamp: Mon 2007-09-10 19:27:54 +1000
    message:
      Transport.ensure_base should ignore PermissionDenied when trying to create the directory (Axel Kollmorgen)
=== modified file 'bzrlib/transport/__init__.py'
--- a/bzrlib/transport/__init__.py	2007-08-22 01:41:24 +0000
+++ b/bzrlib/transport/__init__.py	2007-09-10 09:27:54 +0000
@@ -369,10 +369,10 @@
         """
         # The default implementation just uses "Easier to ask for forgiveness
         # than permission". We attempt to create the directory, and just
-        # suppress a FileExists exception.
+        # suppress FileExists and PermissionDenied (for Windows) exceptions.
         try:
             self.mkdir('.')
-        except errors.FileExists:
+        except (errors.FileExists, errors.PermissionDenied):
             return False
         else:
             return True




More information about the bazaar-commits mailing list