forked from jan/debianmemberportfolio
integrate gpg key lookup with url creation
This commit is contained in:
parent
3707b76c6b
commit
e148c2c0d4
1 changed files with 4 additions and 0 deletions
|
@ -28,6 +28,7 @@ ddportfolio.ini.
|
|||
|
||||
import ConfigParser
|
||||
import pkg_resources
|
||||
from ddportfolioservice.model import keyfinder
|
||||
from urllib import quote_plus
|
||||
|
||||
my_config = ConfigParser.ConfigParser()
|
||||
|
@ -40,6 +41,9 @@ def build_urls(fields):
|
|||
data = {}
|
||||
errors = {}
|
||||
qfields = dict([(key, quote_plus(fields[key])) for key in fields])
|
||||
fpr = keyfinder.getFingerprintByEmail(str(fields['email']))[0]
|
||||
if fpr:
|
||||
qfields['gpgfp'] = fpr
|
||||
for section in my_config.sections():
|
||||
if my_config.has_option(section, 'urls'):
|
||||
for url in my_config.get(section, 'urls').split(','):
|
||||
|
|
Loading…
Reference in a new issue