Gentoo Archives: gentoo-commits

From: Brian Dolbec <dolsen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gentoo-keys:master commit in: gkeys/gkeys/
Date: Mon, 01 Jun 2015 01:57:01
Message-Id: 1433123784.b0402fd5d51b95ca32705936444ae082f4b3a5c4.dolsen@gentoo
1 commit: b0402fd5d51b95ca32705936444ae082f4b3a5c4
2 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jun 1 01:56:24 2015 +0000
4 Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
5 CommitDate: Mon Jun 1 01:56:24 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/gentoo-keys.git/commit/?id=b0402fd5
7
8 gkeys/actions.py: verify url was not smart about being passed a sig url and would fail to verify
9
10 Move EXTENSIONS out as a constant instead of being defined twice.
11
12 gkeys/gkeys/actions.py | 8 +++++---
13 1 file changed, 5 insertions(+), 3 deletions(-)
14
15 diff --git a/gkeys/gkeys/actions.py b/gkeys/gkeys/actions.py
16 index 24c323e..7275739 100644
17 --- a/gkeys/gkeys/actions.py
18 +++ b/gkeys/gkeys/actions.py
19 @@ -36,6 +36,10 @@ demandload(
20 "gkeys.seedhandler:SeedHandler",
21 )
22
23 +
24 +EXTENSIONS = ['.sig', '.asc', '.gpg','.gpgsig']
25 +
26 +
27 class Actions(object):
28 '''Primary API actions'''
29
30 @@ -754,9 +758,8 @@ class Actions(object):
31 url, filepath, timestamp_path)
32 if not success:
33 messages.append(_unicode("File %s cannot be retrieved.") % filepath)
34 - else:
35 + elif '.' + url.rsplit('.', 1)[1] not in EXTENSIONS:
36 if not signature:
37 - EXTENSIONS = ['.sig', '.asc', 'gpg','.gpgsig']
38 success_fetch = False
39 for ext in EXTENSIONS:
40 sig_path = filepath + ext
41 @@ -776,7 +779,6 @@ class Actions(object):
42 _unicode("ACTIONS: verify; local file %s") % filepath)
43 success = os.path.isfile(filepath)
44 if not signature:
45 - EXTENSIONS = ['.sig', '.asc', 'gpg','.gpgsig']
46 success_fetch = False
47 for ext in EXTENSIONS:
48 sig_path = filepath + ext