~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/mail_client.py

  • Committer: Lukáš Lalinský
  • Date: 2007-11-28 17:27:10 UTC
  • mto: This revision was merged to the branch mainline in revision 3049.
  • Revision ID: lalinsky@gmail.com-20071128172710-eaf9o9y8vw2z5joa
Make mail-to address in ``bzr send`` optional for interactive mail clients.

Show diffs side-by-side

added added

removed removed

Lines of Context:
92
92
    def compose(self, prompt, to, subject, attachment, mime_subtype,
93
93
                extension):
94
94
        """See MailClient.compose"""
 
95
        if not to:
 
96
            raise errors.NoMailAddressSpecified()
95
97
        body = msgeditor.edit_commit_message(prompt)
96
98
        if body == '':
97
99
            raise errors.NoMessageSupplied()
253
255
 
254
256
    def _get_compose_commandline(self, to, subject, attach_path):
255
257
        """See ExternalMailClient._get_compose_commandline"""
 
258
        if not to:
 
259
            raise errors.NoMailAddressSpecified()
256
260
        commandline = [to]
257
261
        if subject is not None:
258
262
            commandline.extend(['--subject', subject])