mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-09 12:29:22 +01:00
Bugfixes (and removed threading).
This commit is contained in:
parent
92ed968ed0
commit
889ed86026
@ -72,7 +72,6 @@ def configure(onStart, afterConnect, advanced):
|
|||||||
|
|
||||||
class Python(callbacks.PrivmsgCommandAndRegexp, plugins.Configurable):
|
class Python(callbacks.PrivmsgCommandAndRegexp, plugins.Configurable):
|
||||||
modulechars = '%s%s%s' % (string.ascii_letters, string.digits, '_.')
|
modulechars = '%s%s%s' % (string.ascii_letters, string.digits, '_.')
|
||||||
threaded = True
|
|
||||||
regexps = ['aspnRecipes']
|
regexps = ['aspnRecipes']
|
||||||
configurables = plugins.ConfigurableDictionary(
|
configurables = plugins.ConfigurableDictionary(
|
||||||
[('aspn-snarfer', plugins.ConfigurableBoolType, True,
|
[('aspn-snarfer', plugins.ConfigurableBoolType, True,
|
||||||
@ -138,7 +137,7 @@ class Python(callbacks.PrivmsgCommandAndRegexp, plugins.Configurable):
|
|||||||
else:
|
else:
|
||||||
if hasattr(newmodule, funcName):
|
if hasattr(newmodule, funcName):
|
||||||
f = getattr(newmodule, funcName)
|
f = getattr(newmodule, funcName)
|
||||||
if hasattr(f, '__doc__'):
|
if hasattr(f, '__doc__') and f.__doc__:
|
||||||
s = normalize(f.__doc__)
|
s = normalize(f.__doc__)
|
||||||
irc.reply(msg, s)
|
irc.reply(msg, s)
|
||||||
else:
|
else:
|
||||||
@ -155,7 +154,7 @@ class Python(callbacks.PrivmsgCommandAndRegexp, plugins.Configurable):
|
|||||||
irc.reply(msg, 'Module %s has no documentation.' % name)
|
irc.reply(msg, 'Module %s has no documentation.' % name)
|
||||||
elif name in __builtins__:
|
elif name in __builtins__:
|
||||||
f = __builtins__[name]
|
f = __builtins__[name]
|
||||||
if hasattr(f, '__doc__'):
|
if hasattr(f, '__doc__') and f.__doc__:
|
||||||
irc.reply(msg, normalize(f.__doc__))
|
irc.reply(msg, normalize(f.__doc__))
|
||||||
else:
|
else:
|
||||||
irc.error(msg, 'That function has no documentation.')
|
irc.error(msg, 'That function has no documentation.')
|
||||||
|
@ -53,6 +53,7 @@ class PythonTestCase(PluginTestCase, PluginDocumentation):
|
|||||||
self.assertNotRegexp('pydoc str.replace', r"^'")
|
self.assertNotRegexp('pydoc str.replace', r"^'")
|
||||||
self.assertNotError('pydoc os.path.expanduser')
|
self.assertNotError('pydoc os.path.expanduser')
|
||||||
self.assertNotRegexp('pydoc math.hypot', r'\)\.R')
|
self.assertNotRegexp('pydoc math.hypot', r'\)\.R')
|
||||||
|
self.assertNotRegexp('pydoc threading.Thread', 'NoneType')
|
||||||
|
|
||||||
def testZen(self):
|
def testZen(self):
|
||||||
self.assertNotError('zen')
|
self.assertNotError('zen')
|
||||||
|
Loading…
Reference in New Issue
Block a user