Updated to be a bit more robust.

This commit is contained in:
Jeremy Fincher 2004-08-21 07:27:49 +00:00
parent 49c3f0c6f7
commit 98f0d46266

View File

@ -59,11 +59,11 @@ import textwrap
started = time.time()
import supybot
import supybot.utils as utils
import supybot.registry as registry
def main():
import supybot.conf as conf
import supybot.utils as utils
import supybot.world as world
import supybot.drivers as drivers
import supybot.schedule as schedule
@ -279,7 +279,13 @@ if __name__ == '__main__':
irc = irclib.Irc(network=defaultNetwork)
callback = Owner.Class()
irc.addCallback(callback)
driver = drivers.newDriver(irc)
try:
driver = drivers.newDriver(irc)
except Exception, e:
log.error(utils.normalizeWhitespace("""I couldn't create a network
driver for connecting to IRC. The specific error was this: %s"""),
utils.exnToString(e))
sys.exit(-1)
if options.debug:
for (name, module) in sys.modules.iteritems():