diff options
author | Werner Koch <wk@gnupg.org> | 2018-12-11 12:29:58 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2018-12-11 12:29:58 +0100 |
commit | e7252ae57f3c9da557f23295268f74dd25fee3a1 (patch) | |
tree | 03ef58486f255cea2e5ac9d767101b9bd66dd6b4 | |
parent | tools: Use POSIX compatible arguments for find (diff) | |
download | gnupg2-e7252ae57f3c9da557f23295268f74dd25fee3a1.tar.xz gnupg2-e7252ae57f3c9da557f23295268f74dd25fee3a1.zip |
gpg: In search-keys return "Not found" instead of "No Data".
* g10/keyserver.c (keyserver_search): Check for NO_DATA.
--
GnuPG-bug-id: 3830
Signed-off-by: Werner Koch <wk@gnupg.org>
-rw-r--r-- | g10/keyserver.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/g10/keyserver.c b/g10/keyserver.c index 44870a610..1ba94ed49 100644 --- a/g10/keyserver.c +++ b/g10/keyserver.c @@ -1528,7 +1528,7 @@ keyserver_search (ctrl_t ctrl, strlist_t tokens) err = gpg_dirmngr_ks_search (ctrl, searchstr, search_line_handler, &parm); - if (parm.not_found) + if (parm.not_found || gpg_err_code (err) == GPG_ERR_NO_DATA) { if (parm.searchstr_disp) log_info (_("key \"%s\" not found on keyserver\n"), @@ -1539,6 +1539,8 @@ keyserver_search (ctrl_t ctrl, strlist_t tokens) if (gpg_err_code (err) == GPG_ERR_NO_KEYSERVER) log_error (_("no keyserver known (use option --keyserver)\n")); + else if (gpg_err_code (err) == GPG_ERR_NO_DATA) + err = gpg_error (GPG_ERR_NOT_FOUND); else if (err) log_error ("error searching keyserver: %s\n", gpg_strerror (err)); |