Update regenconf.py: cleanup legacy rspamd and metronome hash entries

This commit is contained in:
Alexandre Aubin 2024-07-18 13:40:22 +02:00 committed by GitHub
parent 88b11bee09
commit 42114978af
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -439,7 +439,13 @@ def _get_regenconf_infos():
""" """
try: try:
with open(REGEN_CONF_FILE, "r") as f: 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: except Exception:
return {} return {}