Return a fake MakeDB function when documenting plugins.

There's no need to actually search for valid database backends when
documenting.  It only gets in the way of the actual document generation
process.

Signed-off-by: James Vega <jamessan@users.sourceforge.net>
This commit is contained in:
James Vega 2009-04-27 19:31:58 -04:00
parent 5c2b493509
commit faed698932

View File

@ -105,6 +105,12 @@ class NoSuitableDatabase(Exception):
self.suitable)
def DB(filename, types):
# We don't care if any of the DBs are actually available when
# documenting, so just fake that we found something suitable
if world.documenting:
def junk(*args, **kwargs):
pass
return junk
filename = conf.supybot.directories.data.dirize(filename)
def MakeDB(*args, **kwargs):
for type in conf.supybot.databases():