~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to shell.py

  • Committer: Aaron Bentley
  • Date: 2009-09-26 16:53:09 UTC
  • mfrom: (723.2.1 shell_improvement_^C)
  • Revision ID: aaron@aaronbentley.com-20090926165309-dbw4ikblf5ce63yi
Merge Benoît Pierre's ^C fix

Show diffs side-by-side

added added

removed removed

Lines of Context:
224
224
def run_shell():
225
225
    try:
226
226
        prompt = PromptCmd()
227
 
        try:
228
 
            prompt.cmdloop()
229
 
        finally:
230
 
            prompt.write_history()
 
227
        while True:
 
228
            try:
 
229
                try:
 
230
                    prompt.cmdloop()
 
231
                except KeyboardInterrupt:
 
232
                    print
 
233
            finally:
 
234
                prompt.write_history()
231
235
    except StopIteration:
232
236
        pass
233
237