From 1bb79e8a95a3da1112bdbe5144ae5395d4a41cbf Mon Sep 17 00:00:00 2001 From: Fiona Ebner Date: Fri, 25 Nov 2022 16:15:36 +0100 Subject: [PATCH] pbs user config: allow parsing unknown sections Previously, configs with entries for tokens could not be parsed successfully, so extracting the mail for the root user failed. Signed-off-by: Fiona Ebner --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index d53a1b4..f3d4193 100644 --- a/src/main.rs +++ b/src/main.rs @@ -46,7 +46,7 @@ fn normalize_for_return(s: Option<&str>) -> Option { /// Extract the root user's email address from the PBS user config. fn get_pbs_mail_to(content: &str) -> Option { - let mut config = SectionConfig::new(&DUMMY_ID_SCHEMA); + let mut config = SectionConfig::new(&DUMMY_ID_SCHEMA).allow_unknown_sections(true); let user_plugin = SectionConfigPlugin::new( "user".to_string(), Some("userid".to_string()),