From daaaa615197d8551457ecf926f6df30c6482a70a Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Sun, 13 Mar 2022 03:08:44 +0100 Subject: Renamed basic event to error event for the sake of the logic. Signed-off-by: Toni Uhlig --- dependencies/nDPIsrvd.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'dependencies/nDPIsrvd.py') 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: -- cgit v1.2.3