##// END OF EJS Templates
fixed exit confirmation glitch
Yuri Numerov -
Show More
@@ -3252,10 +3252,10 b' class InteractiveShell(SingletonConfigurable):'
3252 """Write a string to the default error output"""
3252 """Write a string to the default error output"""
3253 io.stderr.write(data)
3253 io.stderr.write(data)
3254
3254
3255 def ask_yes_no(self, prompt, default=None):
3255 def ask_yes_no(self, prompt, default=None, interrupt=None):
3256 if self.quiet:
3256 if self.quiet:
3257 return True
3257 return True
3258 return ask_yes_no(prompt,default)
3258 return ask_yes_no(prompt,default,interrupt)
3259
3259
3260 def show_usage(self):
3260 def show_usage(self):
3261 """Show a usage message"""
3261 """Show a usage message"""
@@ -617,7 +617,7 b' class TerminalInteractiveShell(InteractiveShell):'
617
617
618 This method calls the ask_exit callback."""
618 This method calls the ask_exit callback."""
619 if self.confirm_exit:
619 if self.confirm_exit:
620 if self.ask_yes_no('Do you really want to exit ([y]/n)?','y'):
620 if self.ask_yes_no('Do you really want to exit ([y]/n)?','y','n'):
621 self.ask_exit()
621 self.ask_exit()
622 else:
622 else:
623 self.ask_exit()
623 self.ask_exit()
General Comments 0
You need to be logged in to leave comments. Login now