Only import cdb if it's needed

This commit is contained in:
James Vega 2009-01-19 21:12:23 +00:00
parent 5fabe8f747
commit a84a0423ad

View File

@ -33,7 +33,6 @@ import sys
import time
import socket
import supybot.cdb as cdb
import supybot.utils as utils
import supybot.registry as registry
import supybot.ircutils as ircutils
@ -864,6 +863,7 @@ registerChannelValue(supybot.databases.plugins.channelSpecific.link, 'allow',
class CDB(registry.Boolean):
def connect(self, filename):
import supybot.cdb as cdb
basename = os.path.basename(filename)
journalName = supybot.directories.data.tmp.dirize(basename+'.journal')
return cdb.open(filename, 'c',