mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 12:42:34 +01:00
Blech. I should reverse the arguments of makeChannelFilename officially, because I keep messing them up.
This commit is contained in:
parent
8936208e02
commit
02cd153e3d
@ -82,7 +82,7 @@ class QuoteRecord(object):
|
||||
|
||||
class SqliteQuotesDB(object):
|
||||
def _getDb(self, channel):
|
||||
filename = plugins.makeChannelFilename('Quotes.db', channel)
|
||||
filename = plugins.makeChannelFilename(channel, 'Quotes.db')
|
||||
if os.path.exists(filename):
|
||||
return sqlite.connect(db=filename, mode=0755,
|
||||
converters={'bool': bool})
|
||||
|
@ -111,6 +111,8 @@ class DBHandler(object):
|
||||
|
||||
|
||||
def makeChannelFilename(channel, filename, dirname=None):
|
||||
assert ircutils.isChannel(channel), 'channel not a channel, ' \
|
||||
'the arguments to makeChannelFilename are probably reversed.'
|
||||
assert filename == os.path.basename(filename), 'We don\'t handle dirs.'
|
||||
channel = ircutils.toLower(channel)
|
||||
if conf.supybot.databases.plugins.channelSpecific.get(channel)():
|
||||
|
Loading…
Reference in New Issue
Block a user