~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bzrdir.py

(lifeless) Teach BzrDir.find_bzrdirs to handle PermissionDenied errors.
 (Marius Kruger) (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
375
375
            recurse = True
376
376
            try:
377
377
                bzrdir = BzrDir.open_from_transport(current_transport)
378
 
            except errors.NotBranchError:
 
378
            except (errors.NotBranchError, errors.PermissionDenied):
379
379
                pass
380
380
            else:
381
381
                recurse, value = evaluate(bzrdir)
382
382
                yield value
383
383
            try:
384
384
                subdirs = list_current(current_transport)
385
 
            except errors.NoSuchFile:
 
385
            except (errors.NoSuchFile, errors.PermissionDenied):
386
386
                continue
387
387
            if recurse:
388
388
                for subdir in sorted(subdirs, reverse=True):
1959
1959
            format_string = transport.get_bytes(".bzr/branch-format")
1960
1960
        except errors.NoSuchFile:
1961
1961
            raise errors.NotBranchError(path=transport.base)
1962
 
 
1963
1962
        try:
1964
1963
            return klass._formats[format_string]
1965
1964
        except KeyError: