~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Martin Pool
  • Date: 2005-09-22 06:59:59 UTC
  • Revision ID: mbp@sourcefrog.net-20050922065959-907f0d91d56d68d7
- raise NotBranchError if format file can't be read

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
import bzrlib
22
22
import bzrlib.trace
23
23
from bzrlib.trace import mutter, note, log_error, warning
24
 
from bzrlib.errors import BzrError, BzrCheckError, BzrCommandError
 
24
from bzrlib.errors import BzrError, BzrCheckError, BzrCommandError, NotBranchError
25
25
from bzrlib.branch import find_branch
26
26
from bzrlib import BZRDIR
27
27
from bzrlib.commands import Command
1052
1052
    takes_options = ['email']
1053
1053
    
1054
1054
    def run(self, email=False):
1055
 
        b = bzrlib.branch.find_branch('.')
 
1055
        try:
 
1056
            b = bzrlib.branch.find_branch('.')
 
1057
        except NotBranchError:
 
1058
            b = None
1056
1059
        
1057
1060
        if email:
1058
1061
            print bzrlib.osutils.user_email(b)