mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-30 06:49:24 +01:00
Fixed the non-quitting bug, although it's not been tested with twistedDrivers itself. It works with the other two.
This commit is contained in:
parent
9cfed8f0d3
commit
c97d3905c5
@ -75,14 +75,9 @@ def main():
|
|||||||
drivers.run()
|
drivers.run()
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
log.info('Exiting due to Ctrl-C.')
|
log.info('Exiting due to Ctrl-C.')
|
||||||
now = time.time()
|
break
|
||||||
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
|
|
||||||
except SystemExit:
|
except SystemExit:
|
||||||
raise
|
break
|
||||||
except:
|
except:
|
||||||
try: # Ok, now we're *REALLY* paranoid!
|
try: # Ok, now we're *REALLY* paranoid!
|
||||||
log.exception('Exception raised out of drivers.run:')
|
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 'raise an exception, but freaking-a, it was a string'
|
||||||
print 'exception. People who raise string exceptions should'
|
print 'exception. People who raise string exceptions should'
|
||||||
print 'die a slow, painful death.'
|
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.')
|
log.info('No more Irc objects, exiting.')
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
@ -384,7 +384,7 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg):
|
|||||||
|
|
||||||
Exits the bot.
|
Exits the bot.
|
||||||
"""
|
"""
|
||||||
raise SystemExit, 'Quitting because I was told by %s' % msg.prefix
|
world.ircs[:] = []
|
||||||
|
|
||||||
def flush(self, irc, msg, args):
|
def flush(self, irc, msg, args):
|
||||||
"""takes no arguments
|
"""takes no arguments
|
||||||
|
Loading…
Reference in New Issue
Block a user