Show More
@@ -21,6 +21,7 b' class gpg:' | |||||
21 |
|
21 | |||
22 | def verify(self, data, sig): |
|
22 | def verify(self, data, sig): | |
23 | """ returns of the good and bad signatures""" |
|
23 | """ returns of the good and bad signatures""" | |
|
24 | sigfile = datafile = None | |||
24 | try: |
|
25 | try: | |
25 | # create temporary files |
|
26 | # create temporary files | |
26 | fd, sigfile = tempfile.mkstemp(prefix="hg-gpg-", suffix=".sig") |
|
27 | fd, sigfile = tempfile.mkstemp(prefix="hg-gpg-", suffix=".sig") | |
@@ -34,12 +35,11 b' class gpg:' | |||||
34 | gpgcmd = ("%s --logger-fd 1 --status-fd 1 --verify " |
|
35 | gpgcmd = ("%s --logger-fd 1 --status-fd 1 --verify " | |
35 | "\"%s\" \"%s\"" % (self.path, sigfile, datafile)) |
|
36 | "\"%s\" \"%s\"" % (self.path, sigfile, datafile)) | |
36 | ret = util.filter("", gpgcmd) |
|
37 | ret = util.filter("", gpgcmd) | |
37 | except: |
|
38 | finally: | |
38 | for f in (sigfile, datafile): |
|
39 | for f in (sigfile, datafile): | |
39 | try: |
|
40 | try: | |
40 | if f: os.unlink(f) |
|
41 | if f: os.unlink(f) | |
41 | except: pass |
|
42 | except: pass | |
42 | raise |
|
|||
43 | keys = [] |
|
43 | keys = [] | |
44 | key, fingerprint = None, None |
|
44 | key, fingerprint = None, None | |
45 | err = "" |
|
45 | err = "" |
General Comments 0
You need to be logged in to leave comments.
Login now