~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: Robert Collins
  • Date: 2005-10-06 12:14:01 UTC
  • mfrom: (1393.1.67)
  • Revision ID: robertc@robertcollins.net-20051006121401-ce87bcb93909bbdf
merge martins latest

Show diffs side-by-side

added added

removed removed

Lines of Context:
624
624
def run_bzr_catch_errors(argv):
625
625
    try:
626
626
        try:
627
 
            try:
628
 
                return run_bzr(argv)
629
 
            finally:
630
 
                # do this here inside the exception wrappers to catch EPIPE
631
 
                sys.stdout.flush()
632
 
        #wrap common errors as CommandErrors.
633
 
        except (NotBranchError,), e:
634
 
            raise BzrCommandError(str(e))
 
627
            return run_bzr(argv)
 
628
        finally:
 
629
            # do this here inside the exception wrappers to catch EPIPE
 
630
            sys.stdout.flush()
635
631
    except BzrCommandError, e:
636
632
        # command line syntax error, etc
637
633
        log_error(str(e))
653
649
            bzrlib.trace.note('broken pipe')
654
650
            return 2
655
651
        else:
 
652
            ## import pdb
 
653
            ## pdb.pm()
656
654
            bzrlib.trace.log_exception()
657
655
            return 2
658
656