2.4 compatibility (this time with an elucidating comment).

This commit is contained in:
Jeremy Fincher 2004-11-23 19:05:55 +00:00
parent 6af23399cc
commit 43b2dcd47e

View File

@ -191,6 +191,9 @@ def newDriver(irc, moduleName=None):
import twistedDrivers import twistedDrivers
moduleName = 'supybot.twistedDrivers' moduleName = 'supybot.twistedDrivers'
except ImportError: except ImportError:
# We formerly used 'del' here, but 2.4 fixes the bug that we added
# the 'del' for, so we need to make sure we don't complain if the
# module is cleaned up already.
sys.modules.pop('supybot.twistedDrivers', None) sys.modules.pop('supybot.twistedDrivers', None)
moduleName = 'supybot.socketDrivers' moduleName = 'supybot.socketDrivers'
elif not moduleName.startswith('supybot.'): elif not moduleName.startswith('supybot.'):