~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/mail_client.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-11-29 14:21:55 UTC
  • mfrom: (3042.1.2 send-optional-address)
  • Revision ID: pqm@pqm.ubuntu.com-20071129142155-4yb05lbhm0eiyczd
Mailto address now optional for send with interactive clients (Lalinsky)

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])