[Python-ideas] Handling lack of permissions/groups with pathlib's rglob

Ned Deily nad at acm.org
Thu May 7 20:27:40 CEST 2015


In article <20150507182324.78706543 at fsol>,
 Antoine Pitrou <solipsis at pitrou.net> 
 wrote:
> On Thu, 7 May 2015 12:06:32 -0400
> Frank Woodall <frankwoodall at gmail.com>
> wrote:
> > The problem occurs when I lack both permissions and group membership to a
> > directory that rglob attempts to descend into. Rglob throws a KeyError and
> > then a PermissionError and finally stops entirely. I see no way to recover
> > gracefully from this and continue globbing. Is this the expected behavior
> > in this case?
> It is not unexpected :) Actually, this case was simply not envisioned.
> I agree that being more laxist could be convenient here.
> 
> If you want to provide a patch for this, you can start at
> https://docs.python.org/devguide/

Also there is an open issue about this that can be used to attach a 
patch or further discussion:

http://bugs.python.org/issue24120

-- 
 Ned Deily,
 nad at acm.org



More information about the Python-ideas mailing list