Skip to content

Commit

Permalink
Moved update before file check.
Browse files Browse the repository at this point in the history
  • Loading branch information
elsif2 committed Mar 18, 2024
1 parent d58dba0 commit 8fdb2f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions intelmq/bots/parsers/shadowserver/_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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):
Expand Down

0 comments on commit 8fdb2f6

Please sign in to comment.