Skip to content

Commit fdc845e

Browse files
committed
Updated to reset report type on reload #2361
1 parent ff262a7 commit fdc845e

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

intelmq/bots/parsers/shadowserver/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ The report configuration is now stored in a _schema.json_ file downloaded from h
1111

1212
For environments that have internet connectivity the `update_schema.py` script should be setup as a cron job to obtain the latest revision.
1313

14-
For air-gapped systems automation will be required to download and copy the _schema.json_ file into this directory
14+
For air-gapped systems automation will be required to download and copy the _schema.json_ file into this directory.
1515

1616
The parser will automatically reload the configuration when the file changes.

intelmq/bots/parsers/shadowserver/_config.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,15 +272,14 @@ def scan_exchange_identifier(field):
272272
def reload ():
273273
""" reload the configuration if it has changed """
274274
mtime = 0.0
275+
schema_file = __config.schema_file
275276

276-
if (os.path.isfile(__config.schema_file)):
277+
if os.path.isfile(__config.schema_file):
277278
mtime = os.path.getmtime(__config.schema_file)
278279
if __config.schema_mtime == mtime:
279280
return
280-
schema_file = __config.schema_file
281281
else:
282282
# load a test schema if one has not been downloaded yet
283-
schema_file = __config.schema_file
284283
schema_file += '.test'
285284

286285
__config.feedname_mapping.clear()

0 commit comments

Comments
 (0)