[PATCH] Do not show 'public key already present' warning in quiet mode

Christian Aistleitner christian at quelltextlich.at
Tue Dec 18 21:22:47 CET 2012


* g10/pkclist.c (find_and_check_key): Do not show 'public key already
present' warning in quiet mode
(build_pk_list): Ditto.
---
 g10/pkclist.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/g10/pkclist.c b/g10/pkclist.c
index f805da8..04e5400 100644
--- a/g10/pkclist.c
+++ b/g10/pkclist.c
@@ -837,7 +837,10 @@ find_and_check_key (ctrl_t ctrl, const char *name, unsigned int use,
      list.  */
   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);
     }
   else
@@ -945,8 +948,11 @@ build_pk_list (ctrl_t ctrl,
               if (key_present_in_pk_list(pk_list, pk) == 0)
                 {
                   free_public_key (pk); pk = NULL;
-                  log_info (_("%s: skipped: public key already present\n"),
-                            rov->d);
+                  if (!opt.quiet)
+                  {
+                    log_info (_("%s: skipped: public key already present\n"),
+                              rov->d);
+                  }
                 }
               else
                 {
-- 
1.7.8.6

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: </pipermail/attachments/20121218/f334f840/attachment.pgp>


More information about the Gnupg-devel mailing list