Committing patch from Joseph Ranieri to handle 'exit()' the same

as 'quit()' in the python script environment.

llvm-svn: 105756
This commit is contained in:
Jason Molenda 2010-06-09 21:56:00 +00:00
parent f7a4715fdb
commit b1823404c3
2 changed files with 2 additions and 2 deletions

View File

@ -88,7 +88,7 @@ class SimpleREPL(code.InteractiveConsole):\n\
# Check the input string to see if it was the quit\n\
# command. If so, intercept it, so that it doesn't\n\
# close stdin on us!\n\
if (temp_str.lower() == \"quit()\"):\n\
if (temp_str.lower() == \"quit()\" or temp_str.lower() == \"exit()\"):\n\
self.loop_exit = True\n\
in_str = \"raise SystemExit \"\n\
return in_str\n\

View File

@ -45,7 +45,7 @@ class SimpleREPL(code.InteractiveConsole):
# Check the input string to see if it was the quit
# command. If so, intercept it, so that it doesn't
# close stdin on us!
if (temp_str.lower() == "quit()"):
if (temp_str.lower() == "quit()" or temp_str.lower() == "exit()"):
self.loop_exit = True
in_str = "raise SystemExit "
return in_str