aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorAlex Legler <alex@a3li.li>2015-08-10 11:19:54 +0200
committerAlex Legler <alex@a3li.li>2015-08-10 11:19:54 +0200
commit73ea24bc8b0f253f05a14cfd72a7e291e285a5ca (patch)
tree5aa2bb965ddc468dd5633163b26e2bc8080c4cbb /bin
parentInline scripts go after jquery and bootstrap's js (diff)
downloadwww-73ea24bc8b0f253f05a14cfd72a7e291e285a5ca.tar.gz
www-73ea24bc8b0f253f05a14cfd72a7e291e285a5ca.tar.bz2
www-73ea24bc8b0f253f05a14cfd72a7e291e285a5ca.zip
Add nickname to gpg error output
Diffstat (limited to 'bin')
-rwxr-xr-xbin/userinfo-export.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/userinfo-export.rb b/bin/userinfo-export.rb
index c805e56..7c9c94c 100755
--- a/bin/userinfo-export.rb
+++ b/bin/userinfo-export.rb
@@ -41,13 +41,13 @@ class GentooLDAP
end
end
-def gpgfp_format(input)
+def gpgfp_format(input, nick)
return nil if input == 'undefined'
raw_fp = input.gsub(/\s/, '')
unless raw_fp.length == 40
- $stderr.puts "Invalid GPG FP: #{input}"
+ $stderr.puts "Invalid GPG FP for #{nick}: #{input}"
return nil
end
@@ -68,7 +68,7 @@ def export(data)
ret['roles'] = data['gentooRoles'].first if data.has_key? 'gentooRoles'
ret['wiki'] = data['gentooWikiUser'].first if data.has_key? 'gentooWikiUser'
- ret['gpgfp'] = data['gpgfingerprint'].map {|fp| gpgfp_format fp }.compact if data.has_key? 'gpgfingerprint'
+ ret['gpgfp'] = data['gpgfingerprint'].map {|fp| gpgfp_format(fp, ret['nick']) }.compact if data.has_key? 'gpgfingerprint'
ret['gpg'] = ret['gpgfp'].map {|fp| gpgfp_to_longid fp } if data.has_key? 'gpgfingerprint'
# Geolocation