Blech. I should reverse the arguments of makeChannelFilename officially, because I keep messing them up.

This commit is contained in:
Jeremy Fincher 2004-08-22 15:04:11 +00:00
parent 8936208e02
commit 02cd153e3d
2 changed files with 3 additions and 1 deletions

View File

@ -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})

View File

@ -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)():