1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-01 22:28:02 +02:00

gpg: Suppress "public key already present" in quiet mode.

* g10/pkclist.c (find_and_check_key, build_pk_list): Print a
diagnostic only in non-quiet mode.
This commit is contained in:
Werner Koch 2012-12-19 11:21:26 +01:00
parent 5a66316ea4
commit 8325d61659

View File

@ -837,7 +837,8 @@ find_and_check_key (ctrl_t ctrl, const char *name, unsigned int use,
list. */ list. */
if (!key_present_in_pk_list (*pk_list_addr, pk)) if (!key_present_in_pk_list (*pk_list_addr, pk))
{ {
log_info (_("%s: skipped: public key already present\n"), name); if (!opt.quiet)
log_info (_("%s: skipped: public key already present\n"), name);
free_public_key (pk); free_public_key (pk);
} }
else else
@ -945,8 +946,9 @@ build_pk_list (ctrl_t ctrl,
if (key_present_in_pk_list(pk_list, pk) == 0) if (key_present_in_pk_list(pk_list, pk) == 0)
{ {
free_public_key (pk); pk = NULL; free_public_key (pk); pk = NULL;
log_info (_("%s: skipped: public key already present\n"), if (!opt.quiet)
rov->d); log_info (_("%s: skipped: public key already present\n"),
rov->d);
} }
else else
{ {