aboutsummaryrefslogtreecommitdiff
path: root/examples/py-semantic-validation
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2022-03-08 14:17:24 +0100
committerToni Uhlig <matzeton@googlemail.com>2022-03-08 14:17:24 +0100
commit6f1f9e65ea86bba7c944b183e7d413a14f71852d (patch)
tree625bc8a843d049d786c65362e843039d556064fc /examples/py-semantic-validation
parentd0985a5732f495c0cdecfdd12dc50d781ef51b24 (diff)
Fixed some pyhton issues with static class members.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'examples/py-semantic-validation')
-rwxr-xr-xexamples/py-semantic-validation/py-semantic-validation.py11
1 files changed, 5 insertions, 6 deletions
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', \