~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: 2007-09-10 10:57:43 UTC
  • mfrom: (2805.3.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20070910105743-72rhm2629qiijbsj
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