~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to shell.py

  • Committer: Aaron Bentley
  • Date: 2005-10-27 14:51:03 UTC
  • Revision ID: abentley@panoramicfeedback.com-20051027145103-f9f856a7ce4789a1
Fixed system.exit printing 0 bug

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
 
55
55
    def do_quit(self, args):
56
56
        self.write_history()
57
 
        sys.exit(0)
 
57
        raise StopIteration
58
58
 
59
59
    def do_exit(self, args):
60
60
        self.do_quit(args)
199
199
            print e
200
200
 
201
201
def run_shell():
202
 
    prompt = PromptCmd()
203
202
    try:
204
 
        prompt.cmdloop()
205
 
    finally:
206
 
        prompt.write_history()
 
203
        prompt = PromptCmd()
 
204
        try:
 
205
            prompt.cmdloop()
 
206
        finally:
 
207
            prompt.write_history()
 
208
    except StopIteration:
 
209
        pass
207
210
 
208
211
def iter_file_completions(arg, only_dirs = False):
209
212
    """Generate an iterator that iterates through filename completions.