Made world cleanup drivers, too.

This commit is contained in:
Jeremy Fincher 2004-01-15 12:55:19 +00:00
parent 63c64af2e4
commit a7ba5a0f25

View File

@ -49,6 +49,7 @@ import threading
import log import log
import conf import conf
import drivers
import ircutils import ircutils
socket.setdefaulttimeout(10) socket.setdefaulttimeout(10)
@ -94,6 +95,12 @@ def upkeep():
log.info('%s upkeep ran.', time.strftime(conf.logTimestampFormat)) log.info('%s upkeep ran.', time.strftime(conf.logTimestampFormat))
return collected return collected
def makeDriversDie():
"""Kills drivers."""
log.info('Killing Driver objects.')
for driver in drivers._drivers.itervalues():
driver.die()
def makeIrcsDie(): def makeIrcsDie():
"""Kills Ircs.""" """Kills Ircs."""
log.info('Killing Irc objects.') log.info('Killing Irc objects.')
@ -112,6 +119,7 @@ def finished():
atexit.register(finished) atexit.register(finished)
atexit.register(upkeep) atexit.register(upkeep)
atexit.register(makeIrcsDie) atexit.register(makeIrcsDie)
atexit.register(makeDriversDie)
atexit.register(startDying) atexit.register(startDying)
################################################## ##################################################