diff --git a/Cargo.lock b/Cargo.lock index 1815f5d0..4145ca4d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2070,7 +2070,7 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openpgp-dsm" -version = "1.1.0" +version = "1.2.0" dependencies = [ "anyhow", "bindgen", diff --git a/openpgp-dsm/Cargo.toml b/openpgp-dsm/Cargo.toml index 50cf9632..2dc3d07a 100644 --- a/openpgp-dsm/Cargo.toml +++ b/openpgp-dsm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "openpgp-dsm" -version = "1.1.0" +version = "1.2.0" authors = ["zugzwang "] edition = "2018" diff --git a/openpgp-dsm/src/lib.rs b/openpgp-dsm/src/lib.rs index 8a4b106c..e6c36ef6 100644 --- a/openpgp-dsm/src/lib.rs +++ b/openpgp-dsm/src/lib.rs @@ -537,8 +537,9 @@ impl KeyMetadata { match serde_json::from_str(&dict[DSM_LABEL_PGP]) { Ok(key_md) => Ok(key_md), Err(e) => { - KeyMetadata::print_metadata_for_pre_0_3_0(&dict[DSM_LABEL_PGP]).unwrap(); - Err(anyhow::anyhow!("failed to read metadata: {:?}", e)) + KeyMetadata::print_metadata_for_pre_0_3_0(&dict[DSM_LABEL_PGP]) + .map_err(|e| anyhow::anyhow!("Failed to read metadata: {:?}", e))?; + Err(anyhow::anyhow!("Failed to parse Sobject: {:?}", e)) } }