gpg: Print a "not found" message for an unknown key in --key-edit.
authorWerner Koch <wk@gnupg.org>
Fri, 4 Oct 2013 16:34:56 +0000 (18:34 +0200)
committerWerner Koch <wk@gnupg.org>
Fri, 4 Oct 2013 16:34:56 +0000 (18:34 +0200)
* g10/keyedit.c (keyedit_menu): Print message.
--

GnuPG-bug-id: 1420
Signed-off-by: Werner Koch <wk@gnupg.org>
g10/keyedit.c

index 76830f0..3470257 100644 (file)
@@ -1568,7 +1568,11 @@ keyedit_menu( const char *username, strlist_t locusr,
     /* Get the public key */
     rc = get_pubkey_byname (NULL, NULL, username, &keyblock, &kdbhd, 1, 1);
     if( rc )
+      {
+        log_error (_("key \"%s\" not found: %s\n"), username, g10_errstr (rc));
        goto leave;
+      }
+
     if( fix_keyblock( keyblock ) )
        modified++;
     if( collapse_uids( &keyblock ) )