this bad
This commit is contained in:
parent
ee057bc45a
commit
fbb6204f83
3 changed files with 44 additions and 26 deletions
|
@ -21,8 +21,12 @@ if os.path.exists(os.path.abspath('lib')):
|
|||
print 'CloudBot2 <http://git.io/cloudbotirc>'
|
||||
|
||||
def exit_gracefully(signum, frame):
|
||||
# this doesn't really work that well
|
||||
cloudbot.stop()
|
||||
|
||||
# restore the original handler so if they do it again it triggers
|
||||
signal.signal(signal.SIGINT, original_sigint)
|
||||
|
||||
# store the original SIGINT handler
|
||||
original_sigint = signal.getsignal(signal.SIGINT)
|
||||
signal.signal(signal.SIGINT, exit_gracefully)
|
||||
|
|
Reference in a new issue