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-semantic-validation/py-semantic-validation.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'examples/py-semantic-validation/py-semantic-validation.py') diff --git a/examples/py-semantic-validation/py-semantic-validation.py b/examples/py-semantic-validation/py-semantic-validation.py index bce0355de..65bf133c1 100755 --- a/examples/py-semantic-validation/py-semantic-validation.py +++ b/examples/py-semantic-validation/py-semantic-validation.py @@ -10,15 +10,14 @@ import nDPIsrvd from nDPIsrvd import nDPIsrvdSocket, TermColor class Stats: - event_counter = dict() - - lines_processed = 0 - print_dot_every = 10 - print_nmb_every = print_dot_every * 5 def __init__(self, nDPIsrvd_sock): - self.resetEventCounter() self.nsock = nDPIsrvd_sock + self.event_counter = dict() + self.resetEventCounter() + self.lines_processed = 0 + self.print_dot_every = 10 + self.print_nmb_every = self.print_dot_every * 5 def resetEventCounter(self): keys = ['init','reconnect','shutdown','status', \ -- cgit v1.2.3