diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2022-03-08 14:17:24 +0100 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2022-03-08 14:17:24 +0100 |
commit | 6f1f9e65ea86bba7c944b183e7d413a14f71852d (patch) | |
tree | 625bc8a843d049d786c65362e843039d556064fc /examples/py-schema-validation | |
parent | d0985a5732f495c0cdecfdd12dc50d781ef51b24 (diff) |
Fixed some pyhton issues with static class members.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'examples/py-schema-validation')
-rwxr-xr-x | examples/py-schema-validation/py-schema-validation.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/py-schema-validation/py-schema-validation.py b/examples/py-schema-validation/py-schema-validation.py index 590ace92e..4a1856895 100755 --- a/examples/py-schema-validation/py-schema-validation.py +++ b/examples/py-schema-validation/py-schema-validation.py @@ -10,9 +10,11 @@ import nDPIsrvd from nDPIsrvd import nDPIsrvdSocket, TermColor class Stats: - lines_processed = 0 - print_dot_every = 10 - print_nmb_every = print_dot_every * 5 + + def __init__(self): + self.lines_processed = 0 + self.print_dot_every = 10 + self.print_nmb_every = self.print_dot_every * 5 def onJsonLineRecvd(json_dict, instance, current_flow, global_user_data): validation_done = nDPIsrvd.validateAgainstSchema(json_dict) |