~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/__init__.py

  • Committer: Martin Pool
  • Date: 2007-09-10 09:27:54 UTC
  • mto: This revision was merged to the branch mainline in revision 2809.
  • Revision ID: mbp@sourcefrog.net-20070910092754-v85j56whbxh75acb
Transport.ensure_base should ignore PermissionDenied when trying to create the directory (Axel Kollmorgen)

Show diffs side-by-side

added added

removed removed

Lines of Context:
369
369
        """
370
370
        # The default implementation just uses "Easier to ask for forgiveness
371
371
        # than permission". We attempt to create the directory, and just
372
 
        # suppress a FileExists exception.
 
372
        # suppress FileExists and PermissionDenied (for Windows) exceptions.
373
373
        try:
374
374
            self.mkdir('.')
375
 
        except errors.FileExists:
 
375
        except (errors.FileExists, errors.PermissionDenied):
376
376
            return False
377
377
        else:
378
378
            return True