1. TortoiseHg
  2. TortoiseHg
  3. thg

Commits

Simon H.  committed 21230bc

hgemail: fix 2nd error message when tmpfile can not be created

  • Participants
  • Parent commits a0530bb
  • Branches default

Comments (0)

Files changed (1)

File hggtk/hgemail.py

View file
  • Ignore whitespace
         desc = self.descbuffer.get_text(start, end)
         if desc and self._intro:
             cmdline += ['--intro']
+        tmpfile = None
         try:
             fd, tmpfile = tempfile.mkstemp(prefix="thg_emaildesc_")
             os.write(fd, desc)
         finally:
             if oldpager:
                 os.environ['PAGER'] = oldpager
-            os.unlink(tmpfile)
+            if tmpfile:
+                os.unlink(tmpfile)
+