~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/msgeditor.py

  • Committer: Daniel Watkins
  • Date: 2007-11-17 17:22:08 UTC
  • mto: This revision was merged to the branch mainline in revision 3013.
  • Revision ID: d.m.watkins@warwick.ac.uk-20071117172208-m47tdnnatvm2ir2u
Modified fix as suggested by John on-list.

Show diffs side-by-side

added added

removed removed

Lines of Context:
205
205
    """
206
206
    import tempfile
207
207
    tmp_fileno, msgfilename = tempfile.mkstemp(prefix='bzr_log.',
 
208
                                               dir='.',
208
209
                                               text=True)
209
210
    msgfilename = osutils.basename(msgfilename)
210
 
    msgfile = file(msgfilename, 'w')
 
211
    msgfile = os.fdopen(tmp_fileno, 'w')
211
212
    try:
212
213
        if start_message is not None:
213
214
            msgfile.write("%s\n" % start_message)