~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/msgeditor.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-05-19 06:14:38 UTC
  • mfrom: (1704.2.23 bzr.mbp.integration)
  • Revision ID: pqm@pqm.ubuntu.com-20060519061438-6300caf3926c3cff
(mbp) small fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
89
89
    """
90
90
    import tempfile
91
91
 
 
92
    msgfilename = None
92
93
    try:
93
94
        tmp_fileno, msgfilename = tempfile.mkstemp(prefix='bzr_log.', dir=u'.')
94
95
        msgfile = os.close(tmp_fileno)
135
136
            return "".join(msg)
136
137
    finally:
137
138
        # delete the msg file in any case
138
 
        try: os.unlink(msgfilename)
139
 
        except IOError: pass
 
139
        if msgfilename is not None:
 
140
            try:
 
141
                os.unlink(msgfilename)
 
142
            except IOError, e:
 
143
                mutter("failed to unlink %s: %s; ignored", msgfilename, e)
140
144
 
141
145
 
142
146
def make_commit_message_template(working_tree, specific_files):