mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 11:42:52 +01:00
Nicer error message in getChannel/makeChannelFilename when channel is None.
This commit is contained in:
parent
f85287771d
commit
bc663b164c
@ -75,7 +75,7 @@ def DB(filename, types):
|
||||
return MakeDB
|
||||
|
||||
def makeChannelFilename(filename, channel=None, dirname=None):
|
||||
assert channel is not None, 'Death to those who use None for their channel'
|
||||
assert channel is not None, 'Channel should not be None'
|
||||
filename = os.path.basename(filename)
|
||||
channelSpecific = conf.supybot.databases.plugins.channelSpecific
|
||||
channel = channelSpecific.getChannelLink(channel)
|
||||
@ -87,7 +87,7 @@ def makeChannelFilename(filename, channel=None, dirname=None):
|
||||
return os.path.join(dirname, filename)
|
||||
|
||||
def getChannel(channel):
|
||||
assert channel is not None, 'Death to those who use None for their channel'
|
||||
assert channel is not None, 'Channel should not be None'
|
||||
channelSpecific = conf.supybot.databases.plugins.channelSpecific
|
||||
return channelSpecific.getChannelLink(channel)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user