summaryrefslogtreecommitdiff
path: root/examples/py-semantic-validation/py-semantic-validation.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/py-semantic-validation/py-semantic-validation.py')
-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', \