From 8fdb2f6476d77bed85a134ac23fadc85a6fc63dd Mon Sep 17 00:00:00 2001 From: elsif2 Date: Mon, 18 Mar 2024 19:32:51 +0000 Subject: [PATCH] Moved update before file check. --- intelmq/bots/parsers/shadowserver/_config.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/intelmq/bots/parsers/shadowserver/_config.py b/intelmq/bots/parsers/shadowserver/_config.py index 6f3be4c14..28d406ed9 100644 --- a/intelmq/bots/parsers/shadowserver/_config.py +++ b/intelmq/bots/parsers/shadowserver/_config.py @@ -330,6 +330,9 @@ def reload(): """ reload the configuration if it has changed """ mtime = 0.0 + if __config.schema_mtime == 0.0 and __config.auto_update: + update_schema() + if os.path.isfile(__config.schema_file): mtime = os.path.getmtime(__config.schema_file) if __config.schema_mtime == mtime: @@ -338,9 +341,6 @@ def reload(): if not __config.test_mode: raise ValueError("The schema file does not exist: %r.", __config.schema_file) - if __config.schema_mtime == 0.0 and mtime == 0.0 and __config.auto_update: - update_schema() - __config.feedname_mapping.clear() __config.filename_mapping.clear() if os.path.isfile(__config.schema_active):