From c97d3905c5664ddf86cdbda978c40faeb16b31f0 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Wed, 7 Apr 2004 15:52:28 +0000 Subject: [PATCH] Fixed the non-quitting bug, although it's not been tested with twistedDrivers itself. It works with the other two. --- scripts/supybot | 14 +++++++------- src/Owner.py | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/supybot b/scripts/supybot index 8ae227f8f..ccd82f36c 100755 --- a/scripts/supybot +++ b/scripts/supybot @@ -75,14 +75,9 @@ def main(): drivers.run() except KeyboardInterrupt: log.info('Exiting due to Ctrl-C.') - now = time.time() - seconds = now - world.startedAt - log.info('Total uptime: %s.', utils.timeElapsed(seconds)) - (user, system, _, _, _) = os.times() - log.info('Total CPU time taken: %s seconds.', user+system) - raise SystemExit + break except SystemExit: - raise + break except: try: # Ok, now we're *REALLY* paranoid! log.exception('Exception raised out of drivers.run:') @@ -96,6 +91,11 @@ def main(): print 'raise an exception, but freaking-a, it was a string' print 'exception. People who raise string exceptions should' print 'die a slow, painful death.' + now = time.time() + seconds = now - world.startedAt + log.info('Total uptime: %s.', utils.timeElapsed(seconds)) + (user, system, _, _, _) = os.times() + log.info('Total CPU time taken: %s seconds.', user+system) log.info('No more Irc objects, exiting.') if __name__ == '__main__': diff --git a/src/Owner.py b/src/Owner.py index 7f3a8de32..a999b254b 100644 --- a/src/Owner.py +++ b/src/Owner.py @@ -384,7 +384,7 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg): Exits the bot. """ - raise SystemExit, 'Quitting because I was told by %s' % msg.prefix + world.ircs[:] = [] def flush(self, irc, msg, args): """takes no arguments