~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/mail_client.py

  • Committer: Edwin Grubbs
  • Date: 2009-06-07 01:17:13 UTC
  • mto: (4416.2.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4417.
  • Revision ID: edwin.grubbs@canonical.com-20090607011713-peahmxl805e5yxwm
Added comment.

Show diffs side-by-side

added added

removed removed

Lines of Context:
271
271
            message_options.extend(['-a',
272
272
                self._encode_path(attach_path, 'attachment')])
273
273
        if body is not None:
 
274
            # mkstemp() is used instead of NamedTemporaryFile, so that
 
275
            # the file won't be deleted when the object gets garbage
 
276
            # collected, which may be before mutt can read it.
274
277
            fd, temp_file = tempfile.mkstemp(prefix="mutt-body-",
275
278
                                             suffix=".txt")
276
279
            try: