Ben Okopnik <b...@okopnik.com> added the comment: Trivial fix: please see attached. As to test_pydoc.py, I don't know the system well enough to fiddle with it, but something like this should work (untested):
def test_unreadable_dir(self): ''' pydoc should handle unreadable subdirs gracefully ''' @contextmanager def mk_unreadable_dir(): top_level_dir = tempfile.mkdtemp() bad_dir = tempfile.mkdtemp(dir=top_level_dir) os.chmod(bad_dir, 0) os.chdir(top_level_dir) yield os.removedirs(top_level_dir) with mk_unreadable_dir(): doc = pydoc.render_doc('modules') self.assertTrue("modules" in doc) ---------- Added file: http://bugs.python.org/file21807/pydoc_crash_test _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11914> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com