mirror of
https://github.com/romanz/amodem.git
synced 2026-04-01 17:26:49 +08:00
gpg: no support for empty user_id
This commit is contained in:
@@ -179,7 +179,7 @@ def gpg_version(sp=subprocess):
|
||||
|
||||
def export_public_key(user_id, sp=subprocess):
|
||||
"""Export GPG public key for specified `user_id`."""
|
||||
args = ['gpg2', '--export'] + ([user_id] if user_id else [])
|
||||
args = ['gpg2', '--export', user_id]
|
||||
result = sp.check_output(args=args)
|
||||
if not result:
|
||||
log.error('could not find public key %r in local GPG keyring', user_id)
|
||||
|
||||
Reference in New Issue
Block a user