Mercurial > hg-stable
changeset 2231:9a2f4b2e7cf1
gpg extension: Always remove temporary files created by 'hg sigcheck'.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Tue, 09 May 2006 13:26:16 +0200 |
parents | 332950340788 |
children | ef3c039e7ab8 5e5adc1910ed |
files | hgext/gpg.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/gpg.py Mon May 08 16:50:27 2006 -0700 +++ b/hgext/gpg.py Tue May 09 13:26:16 2006 +0200 @@ -21,6 +21,7 @@ def verify(self, data, sig): """ returns of the good and bad signatures""" + sigfile = datafile = None try: # create temporary files fd, sigfile = tempfile.mkstemp(prefix="hg-gpg-", suffix=".sig") @@ -34,12 +35,11 @@ gpgcmd = ("%s --logger-fd 1 --status-fd 1 --verify " "\"%s\" \"%s\"" % (self.path, sigfile, datafile)) ret = util.filter("", gpgcmd) - except: + finally: for f in (sigfile, datafile): try: if f: os.unlink(f) except: pass - raise keys = [] key, fingerprint = None, None err = ""