From 6f1f9e65ea86bba7c944b183e7d413a14f71852d Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Tue, 8 Mar 2022 14:17:24 +0100 Subject: Fixed some pyhton issues with static class members. Signed-off-by: Toni Uhlig --- examples/py-schema-validation/py-schema-validation.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'examples/py-schema-validation') 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) -- cgit v1.2.3