~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: Martin Pool
  • Date: 2005-09-12 01:29:49 UTC
  • mto: (1092.2.12) (974.1.76) (1185.8.2)
  • mto: This revision was merged to the branch mainline in revision 1390.
  • Revision ID: mbp@sourcefrog.net-20050912012949-73a539d3f2542173
- patch from mpe to automatically add parent directories

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
import bzrlib
35
35
import bzrlib.trace
36
36
from bzrlib.trace import mutter, note, log_error, warning
37
 
from bzrlib.errors import BzrError, BzrCheckError, BzrCommandError, NotBranchError
 
37
from bzrlib.errors import BzrError, BzrCheckError, BzrCommandError
38
38
from bzrlib.branch import find_branch
39
39
from bzrlib import BZRDIR
40
40
 
651
651
 
652
652
    try:
653
653
        try:
654
 
            try:
655
 
                return run_bzr(argv[1:])
656
 
            finally:
657
 
                # do this here inside the exception wrappers to catch EPIPE
658
 
                sys.stdout.flush()
659
 
        #wrap common errors as CommandErrors.
660
 
        except (NotBranchError,), e:
661
 
            raise BzrCommandError(str(e))
 
654
            return run_bzr(argv[1:])
 
655
        finally:
 
656
            # do this here inside the exception wrappers to catch EPIPE
 
657
            sys.stdout.flush()
662
658
    except BzrCommandError, e:
663
659
        # command line syntax error, etc
664
660
        log_error(str(e))