diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2022-03-13 03:08:44 +0100 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2022-03-13 03:08:44 +0100 |
commit | daaaa615197d8551457ecf926f6df30c6482a70a (patch) | |
tree | 643e945b30efe9e64d436febb26d47503e121512 /dependencies/nDPIsrvd.py | |
parent | ed1647b9446f84d81d41e8e28ccf063eff97b2f7 (diff) |
Renamed basic event to error event for the sake of the logic.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'dependencies/nDPIsrvd.py')
-rw-r--r-- | dependencies/nDPIsrvd.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dependencies/nDPIsrvd.py b/dependencies/nDPIsrvd.py index 37cc3002f..a03b878d1 100644 --- a/dependencies/nDPIsrvd.py +++ b/dependencies/nDPIsrvd.py @@ -459,7 +459,7 @@ def validateAddress(args): return address global schema -schema = {'packet_event_schema' : None, 'basic_event_schema' : None, 'daemon_event_schema' : None, 'flow_event_schema' : None} +schema = {'packet_event_schema' : None, 'error_event_schema' : None, 'daemon_event_schema' : None, 'flow_event_schema' : None} def initSchemaValidator(schema_dirs=[]): if len(schema_dirs) == 0: @@ -486,11 +486,11 @@ def validateAgainstSchema(json_dict): except AttributeError: jsonschema.validate(instance=json_dict, schema=schema['packet_event_schema']) return True - if 'basic_event_id' in json_dict: + if 'error_event_id' in json_dict: try: - jsonschema.Draft7Validator(schema=schema['basic_event_schema']).validate(instance=json_dict) + jsonschema.Draft7Validator(schema=schema['error_event_schema']).validate(instance=json_dict) except AttributeError: - jsonschema.validate(instance=json_dict, schema=schema['basic_event_schema']) + jsonschema.validate(instance=json_dict, schema=schema['error_event_schema']) return True if 'daemon_event_id' in json_dict: try: |