[issue11914] pydoc modules/help('modules') crash in dirs with unreadable subdirs

Ben Okopnik report at bugs.python.org
Wed Apr 27 23:01:40 CEST 2011


Ben Okopnik <ben at okopnik.com> added the comment:

Whoops... with all of that, I just realized that this bug should be filed against pkgutil, not pydoc (pydoc, of course, calls pkgutil to do the path resolution, which is where this crash occurs.) My bad.

>>> import pkgutil
>>> inst = pkgutil.ImpImporter(path='/tmp')
>>> list(inst.iter_modules())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.1/pkgutil.py", line 209, in iter_modules
    for fn in os.listdir(path):
OSError: [Errno 13] Permission denied: '/tmp/orbit-gdm'

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11914>
_______________________________________


More information about the Python-bugs-list mailing list