Add some more assertion messages.

This commit is contained in:
James Vega 2005-03-22 19:03:02 +00:00
parent 2c96a65704
commit 7c5463dd3e
2 changed files with 4 additions and 2 deletions

View File

@ -192,7 +192,8 @@ class Owner(callbacks.Plugin):
conf.registerNetwork(network, password)
serverS = '%s:%s' % serverPort
conf.supybot.networks.get(network).servers.append(serverS)
assert conf.supybot.networks.get(network).servers()
assert conf.supybot.networks.get(network).servers(), \
'No servers are set for the %s network.' % network
self.log.info('Creating new Irc for %s.', network)
newIrc = irclib.Irc(network)
for irc in world.ircs:

View File

@ -101,7 +101,8 @@ def loadPluginClass(irc, module, register=None):
if hasattr(cb, 'public'):
public = cb.public
conf.registerPlugin(plugin, register, public)
assert not irc.getCallback(plugin)
assert not irc.getCallback(plugin), \
'There is already a %r plugin registered.' % plugin
try:
renames = []#XXX registerRename(plugin)()
if renames: