From 42114978af3734fd02b183ec0e5fd6377c4dddf1 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com> Date: Thu, 18 Jul 2024 13:40:22 +0200 Subject: [PATCH] Update regenconf.py: cleanup legacy rspamd and metronome hash entries --- src/regenconf.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/regenconf.py b/src/regenconf.py index 5b9f117c6..05a6edf81 100644 --- a/src/regenconf.py +++ b/src/regenconf.py @@ -439,7 +439,13 @@ def _get_regenconf_infos(): """ try: with open(REGEN_CONF_FILE, "r") as f: - return yaml.safe_load(f) + data = yaml.safe_load(f) + # Cleanup legacy + if "metronome" in data: + del data["metronome"] + if "rspamd" in data: + del data["rspamd"] + return data except Exception: return {}