Bugfixes (and removed threading).

This commit is contained in:
Jeremy Fincher 2003-11-17 06:00:56 +00:00
parent 92ed968ed0
commit 889ed86026
2 changed files with 3 additions and 3 deletions

View File

@ -72,7 +72,6 @@ def configure(onStart, afterConnect, advanced):
class Python(callbacks.PrivmsgCommandAndRegexp, plugins.Configurable):
modulechars = '%s%s%s' % (string.ascii_letters, string.digits, '_.')
threaded = True
regexps = ['aspnRecipes']
configurables = plugins.ConfigurableDictionary(
[('aspn-snarfer', plugins.ConfigurableBoolType, True,
@ -138,7 +137,7 @@ class Python(callbacks.PrivmsgCommandAndRegexp, plugins.Configurable):
else:
if hasattr(newmodule, funcName):
f = getattr(newmodule, funcName)
if hasattr(f, '__doc__'):
if hasattr(f, '__doc__') and f.__doc__:
s = normalize(f.__doc__)
irc.reply(msg, s)
else:
@ -155,7 +154,7 @@ class Python(callbacks.PrivmsgCommandAndRegexp, plugins.Configurable):
irc.reply(msg, 'Module %s has no documentation.' % name)
elif name in __builtins__:
f = __builtins__[name]
if hasattr(f, '__doc__'):
if hasattr(f, '__doc__') and f.__doc__:
irc.reply(msg, normalize(f.__doc__))
else:
irc.error(msg, 'That function has no documentation.')

View File

@ -53,6 +53,7 @@ class PythonTestCase(PluginTestCase, PluginDocumentation):
self.assertNotRegexp('pydoc str.replace', r"^'")
self.assertNotError('pydoc os.path.expanduser')
self.assertNotRegexp('pydoc math.hypot', r'\)\.R')
self.assertNotRegexp('pydoc threading.Thread', 'NoneType')
def testZen(self):
self.assertNotError('zen')