Better error catching and print when connecting.

This commit is contained in:
Jeremy Fincher 2004-08-25 05:08:27 +00:00
parent e4d77f4285
commit 6b72890679
1 changed files with 4 additions and 0 deletions

View File

@ -45,6 +45,7 @@ import imp
import sre import sre
import sys import sys
import getopt import getopt
import socket
import logging import logging
import linecache import linecache
@ -194,7 +195,10 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg):
for network in conf.supybot.networks(): for network in conf.supybot.networks():
try: try:
self._connect(network) self._connect(network)
except socket.error, e:
self.log.error('Could not connect to %s: %s.', network, e)
except Exception, e: except Exception, e:
self.log.exception('Exception connecting to %s:', network)
self.log.error('Could not connect to %s: %s.', network, e) self.log.error('Could not connect to %s: %s.', network, e)
# Setup plugins and default plugins for commands. # Setup plugins and default plugins for commands.
for (name, s) in registry._cache.iteritems(): for (name, s) in registry._cache.iteritems():