Use the visual idiom for cert, userid pairs when importing revs.

- See #486.
This commit is contained in:
Justus Winter 2024-12-15 19:34:19 +01:00
parent 93851b524a
commit f2f09fbc51
No known key found for this signature in database
GPG Key ID: 686F55B4AB2B3386

View File

@ -277,22 +277,18 @@ fn import_rev(o: &mut dyn std::io::Write,
{ {
let cert = cert.insert_packets(sig.clone())?; let cert = cert.insert_packets(sig.clone())?;
let fingerprint = cert.fingerprint(); ui::emit_cert(o, sq, &cert)?;
let sanitized_userid = sq.best_userid(&cert, true);
if let Err(err) = cert_store.update_by(Arc::new(cert.into()), if let Err(err) = cert_store.update_by(Arc::new(cert.into()),
stats) stats)
{ {
wwriteln!(o, wwriteln!(stream = o, initial_indent = " - ",
"Error importing revocation certificate \ "error importing revocation certificate: {}",
for {}, {}: {}", err);
fingerprint, sanitized_userid, err);
stats.certs.inc_errors(); stats.certs.inc_errors();
continue; continue;
} else { } else {
wwriteln!(o, wwriteln!(stream = o, initial_indent = " - ",
"Imported revocation certificate \ "imported revocation certificate");
for {}, {}",
fingerprint, sanitized_userid);
} }
return Ok(()); return Ok(());