hgext/gpg.py
changeset 2231 9a2f4b2e7cf1
parent 2165 d821918e3bee
child 2875 3d6efcbbd1c9
--- 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 = ""