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:
|
if info[0] is not None:
|
||||||
info[0].close()
|
info[0].close()
|
||||||
except ImportError:
|
except ImportError:
|
||||||
irc.error(msg, 'No such module %s exists.' % name)
|
if parts == ['os', 'path']:
|
||||||
return
|
newmodule = os.path
|
||||||
|
else:
|
||||||
|
irc.error(msg, 'No such module %s exists.' % name)
|
||||||
|
return
|
||||||
if hasattr(newmodule, functionName):
|
if hasattr(newmodule, functionName):
|
||||||
f = getattr(newmodule, functionName)
|
f = getattr(newmodule, functionName)
|
||||||
if hasattr(f, '__doc__'):
|
if hasattr(f, '__doc__'):
|
||||||
|
@ -50,6 +50,7 @@ class PythonTestCase(PluginTestCase, PluginDocumentation):
|
|||||||
self.assertNotError('pydoc socket.socket')
|
self.assertNotError('pydoc socket.socket')
|
||||||
self.assertNotError('pydoc logging.Logger')
|
self.assertNotError('pydoc logging.Logger')
|
||||||
self.assertNotRegexp('pydoc str.replace', r"^'")
|
self.assertNotRegexp('pydoc str.replace', r"^'")
|
||||||
|
self.assertNotError('pydoc os.path.expanduser')
|
||||||
|
|
||||||
def testZen(self):
|
def testZen(self):
|
||||||
self.assertNotError('zen')
|
self.assertNotError('zen')
|
||||||
|
Loading…
Reference in New Issue
Block a user