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, 7 Mar 2014 09:18:32 +0000 (10:18 +0100)
* g10/keyedit.c (keyedit_menu): Print message.
--

GnuPG-bug-id: 1420
Signed-off-by: Werner Koch <wk@gnupg.org>
(cherry picked from commit 0bf54e60d31389812d05c3fd29bece876204561d)

Resolved conflicts:
g10/keyedit.c: Fix white spaces

g10/keyedit.c

index 2b8b582..47a2234 100644 (file)
@@ -1506,7 +1506,10 @@ keyedit_menu (ctrl_t ctrl, const char *username, strlist_t locusr,
   /* Get the public key */
   err = get_pubkey_byname (ctrl, NULL, NULL, username, &keyblock, &kdbhd, 1, 1);
   if (err)
-    goto leave;
+    {
+      log_error (_("key \"%s\" not found: %s\n"), username, gpg_strerror (err));
+      goto leave;
+    }
   if (fix_keyblock (keyblock))
     modified++;
   if (collapse_uids (&keyblock))