mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Fixed os.path lookups.
This commit is contained in:
parent
e189603220
commit
e8284ca938
@ -119,8 +119,11 @@ class Python(callbacks.Privmsg):
|
||||
if info[0] is not None:
|
||||
info[0].close()
|
||||
except ImportError:
|
||||
irc.error(msg, 'No such module %s exists.' % name)
|
||||
return
|
||||
if parts == ['os', 'path']:
|
||||
newmodule = os.path
|
||||
else:
|
||||
irc.error(msg, 'No such module %s exists.' % name)
|
||||
return
|
||||
if hasattr(newmodule, functionName):
|
||||
f = getattr(newmodule, functionName)
|
||||
if hasattr(f, '__doc__'):
|
||||
|
@ -50,6 +50,7 @@ class PythonTestCase(PluginTestCase, PluginDocumentation):
|
||||
self.assertNotError('pydoc socket.socket')
|
||||
self.assertNotError('pydoc logging.Logger')
|
||||
self.assertNotRegexp('pydoc str.replace', r"^'")
|
||||
self.assertNotError('pydoc os.path.expanduser')
|
||||
|
||||
def testZen(self):
|
||||
self.assertNotError('zen')
|
||||
|
Loading…
Reference in New Issue
Block a user