Fixed bug with pydoc logging.Logger.

This commit is contained in:
Jeremy Fincher 2003-10-20 22:37:33 +00:00
parent e1eb6cff8e
commit 776bad5700
2 changed files with 3 additions and 1 deletions

View File

@ -116,7 +116,8 @@ class Python(callbacks.Privmsg):
info = imp.find_module(name, path)
newmodule = imp.load_module(name, *info)
path = [os.path.dirname(newmodule.__file__)]
info[0].close()
if info[0] is not None:
info[0].close()
except ImportError:
irc.error(msg, 'No such module %s exists.' % name)
return

View File

@ -48,6 +48,7 @@ class PythonTestCase(PluginTestCase, PluginDocumentation):
self.assertNotError('pydoc string.translate')
self.assertNotError('pydoc fnmatch.fnmatch')
self.assertNotError('pydoc socket.socket')
self.assertNotError('pydoc logging.Logger')
def testZen(self):
self.assertNotError('zen')