Added some useless little facts on exit.

This commit is contained in:
Jeremy Fincher 2004-02-02 08:34:17 +00:00
parent b9e611fd91
commit 07ba0d5bbe

View File

@ -40,7 +40,6 @@ import os
import sys import sys
import atexit import atexit
import shutil import shutil
import os.path
if sys.version_info < (2, 3, 0): if sys.version_info < (2, 3, 0):
sys.stderr.write('This program requires Python >= 2.3.0\n') sys.stderr.write('This program requires Python >= 2.3.0\n')
@ -61,6 +60,7 @@ import registry
def main(): def main():
import conf import conf
import utils
import world import world
import drivers import drivers
import schedule import schedule
@ -72,7 +72,11 @@ def main():
log.info('No more Irc objects, exiting.') log.info('No more Irc objects, exiting.')
except KeyboardInterrupt: except KeyboardInterrupt:
log.info('Exiting due to Ctrl-C.') log.info('Exiting due to Ctrl-C.')
raise SystemExit, 'Goodbye!' now = time.time()
log.info('Total uptime: %s.', utils.timeElapsed(now - world.startedAt))
(user, system, _, _, _) = os.times()
log.info('Total CPU time taken: %s seconds.', user+system)
raise SystemExit
except: except:
log.exception('Exception raised out of drivers.run:') log.exception('Exception raised out of drivers.run:')