kbx: Log debug fixes

--
This commit is contained in:
Werner Koch 2021-02-25 17:02:49 +01:00
parent d51a5ca108
commit c032066d6b
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
2 changed files with 5 additions and 3 deletions

View File

@ -375,7 +375,8 @@ kbx_client_data_cmd (kbx_client_data_t kcd, const char *command,
status_cb, status_cb_value); status_cb, status_cb_value);
if (err) if (err)
{ {
if (gpg_err_code (err) != GPG_ERR_NOT_FOUND) if (gpg_err_code (err) != GPG_ERR_NOT_FOUND
&& gpg_err_code (err) != GPG_ERR_NOTHING_FOUND)
log_debug ("%s: finished command with error: %s\n", log_debug ("%s: finished command with error: %s\n",
__func__, gpg_strerror (err)); __func__, gpg_strerror (err));
/* Fixme: On unexpected errors we need a way to cancel the /* Fixme: On unexpected errors we need a way to cancel the
@ -397,7 +398,8 @@ kbx_client_data_cmd (kbx_client_data_t kcd, const char *command,
status_cb, status_cb_value); status_cb, status_cb_value);
if (err) if (err)
{ {
if (gpg_err_code (err) != GPG_ERR_NOT_FOUND) if (gpg_err_code (err) != GPG_ERR_NOT_FOUND
&& gpg_err_code (err) != GPG_ERR_NOTHING_FOUND)
log_debug ("%s: finished command with error: %s\n", log_debug ("%s: finished command with error: %s\n",
__func__, gpg_strerror (err)); __func__, gpg_strerror (err));
xfree (get_membuf (&mb, &len)); xfree (get_membuf (&mb, &len));

View File

@ -720,7 +720,7 @@ list_one_kinfo (card_info_t info, key_info_t kinfo,
if (err) if (err)
{ {
if (gpg_err_code (err) != GPG_ERR_NO_PUBKEY) if (gpg_err_code (err) != GPG_ERR_NO_PUBKEY)
tty_fprintf (fp, " error ......: %s\n", gpg_strerror (err)); tty_fprintf (fp, " used for ...: [%s]\n", gpg_strerror (err));
goto leave; goto leave;
} }
for (kb = keyblock; kb; kb = kb->next) for (kb = keyblock; kb; kb = kb->next)