~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Aaron Bentley
  • Date: 2009-03-11 07:22:53 UTC
  • mto: This revision was merged to the branch mainline in revision 4130.
  • Revision ID: aaron@aaronbentley.com-20090311072253-fqkbpkjbttqajocc
Cleaner support for mail clients lacking body support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4774
4774
                if mail_to is None:
4775
4775
                    mail_to = config.get_user_option('submit_to')
4776
4776
                mail_client = config.get_mail_client()
 
4777
                if (not getattr(mail_client, 'supports_body', False)
 
4778
                    and body is not None):
 
4779
                    raise errors.BzrCommandError(
 
4780
                        'Mail client "%s" does not support specifying body' %
 
4781
                        mail_client.__class__.__name__)
4777
4782
            if remember and submit_branch is None:
4778
4783
                raise errors.BzrCommandError(
4779
4784
                    '--remember requires a branch to be specified.')