mirror of https://github.com/Mikaela/Limnoria.git
Only import cdb if it's needed
This commit is contained in:
parent
5fabe8f747
commit
a84a0423ad
|
@ -33,7 +33,6 @@ import sys
|
||||||
import time
|
import time
|
||||||
import socket
|
import socket
|
||||||
|
|
||||||
import supybot.cdb as cdb
|
|
||||||
import supybot.utils as utils
|
import supybot.utils as utils
|
||||||
import supybot.registry as registry
|
import supybot.registry as registry
|
||||||
import supybot.ircutils as ircutils
|
import supybot.ircutils as ircutils
|
||||||
|
@ -864,6 +863,7 @@ registerChannelValue(supybot.databases.plugins.channelSpecific.link, 'allow',
|
||||||
|
|
||||||
class CDB(registry.Boolean):
|
class CDB(registry.Boolean):
|
||||||
def connect(self, filename):
|
def connect(self, filename):
|
||||||
|
import supybot.cdb as cdb
|
||||||
basename = os.path.basename(filename)
|
basename = os.path.basename(filename)
|
||||||
journalName = supybot.directories.data.tmp.dirize(basename+'.journal')
|
journalName = supybot.directories.data.tmp.dirize(basename+'.journal')
|
||||||
return cdb.open(filename, 'c',
|
return cdb.open(filename, 'c',
|
||||||
|
|
Loading…
Reference in New Issue