Author okopnik
Recipients eric.araujo, okopnik
Date 2011-04-27.17:27:44
SpamBayes Score 0.000166359
Marked as misclassified No
Message-id <1303925265.82.0.276365644012.issue11914@psf.upfronthosting.co.za>
In-reply-to
Content
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)
History
Date User Action Args
2011-04-27 17:27:45okopniksetrecipients: + okopnik, eric.araujo
2011-04-27 17:27:45okopniksetmessageid: <1303925265.82.0.276365644012.issue11914@psf.upfronthosting.co.za>
2011-04-27 17:27:44okopniklinkissue11914 messages
2011-04-27 17:27:44okopnikcreate