File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
intelmq/bots/parsers/shadowserver Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1622,7 +1622,7 @@ The report configuration is stored in a `shadowserver-schema.json` file download
1622
1622
1623
1623
The parser will attempt to download a schema update on startup when the *auto_update * option is enabled.
1624
1624
1625
- Schema downloads can also be scheduled as a cron job:
1625
+ Schema downloads can also be scheduled as a cron job for the ` intelmq ` user :
1626
1626
1627
1627
.. code-block :: bash
1628
1628
Original file line number Diff line number Diff line change @@ -102,6 +102,7 @@ class __Container:
102
102
__config .schema_active = __config .schema_file
103
103
__config .schema_mtime = 0.0
104
104
__config .auto_update = False
105
+ __config .test_mode = False
105
106
__config .feedname_mapping = {}
106
107
__config .filename_mapping = {}
107
108
@@ -113,6 +114,7 @@ def set_logger(logger):
113
114
114
115
def enable_test_mode (enable ):
115
116
""" Set which schema to load. """
117
+ __config .test_mode = enable
116
118
if enable :
117
119
__config .schema_active = __config .schema_base
118
120
else :
@@ -318,7 +320,8 @@ def reload():
318
320
if __config .schema_mtime == mtime :
319
321
return
320
322
else :
321
- __config .logger .info ("The schema file does not exist." )
323
+ if not __config .test_mode :
324
+ raise ValueError ("The schema file does not exist." )
322
325
323
326
if __config .schema_mtime == 0.0 and mtime == 0.0 and __config .auto_update :
324
327
update_schema ()
You can’t perform that action at this time.
0 commit comments