src/drivers/__init__.py: Make Socket the default driver since Twisted has been causing so many problems lately.

This commit is contained in:
James Vega 2006-04-13 14:26:06 +00:00
parent 96e001e43a
commit 9b79f112a0

View File

@ -184,6 +184,11 @@ def newDriver(irc, moduleName=None):
if moduleName is None: if moduleName is None:
moduleName = conf.supybot.drivers.module() moduleName = conf.supybot.drivers.module()
if moduleName == 'default': if moduleName == 'default':
# XXX Twisted has been causing problems lately, so we're going to use
# the Socket driver by default, now. Leaving behind the code for using
# Twisted by default in case someone steps up and fixes the Twisted
# driver.
'''
try: try:
import supybot.drivers.Twisted import supybot.drivers.Twisted
moduleName = 'supybot.drivers.Twisted' moduleName = 'supybot.drivers.Twisted'
@ -193,6 +198,8 @@ def newDriver(irc, moduleName=None):
# module is cleaned up already. # module is cleaned up already.
sys.modules.pop('supybot.drivers.Twisted', None) sys.modules.pop('supybot.drivers.Twisted', None)
moduleName = 'supybot.drivers.Socket' moduleName = 'supybot.drivers.Socket'
'''
moduleName = 'supybot.drivers.Socket'
elif not moduleName.startswith('supybot.drivers.'): elif not moduleName.startswith('supybot.drivers.'):
moduleName = 'supybot.drivers.' + moduleName moduleName = 'supybot.drivers.' + moduleName
driverModule = __import__(moduleName, {}, {}, ['not empty']) driverModule = __import__(moduleName, {}, {}, ['not empty'])