From 77a87254b65f8f58ae58051f7422160ca33e648c Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Tue, 7 Jun 2022 17:59:47 +0200 Subject: nDPIsrvd.py: Throw SocketTimeout Exception to catch both timeout exceptions different Python versions can throw. Signed-off-by: Toni Uhlig --- examples/py-flow-info/flow-info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/py-flow-info/flow-info.py b/examples/py-flow-info/flow-info.py index 541a8c16d..7384d687a 100755 --- a/examples/py-flow-info/flow-info.py +++ b/examples/py-flow-info/flow-info.py @@ -439,7 +439,7 @@ if __name__ == '__main__': except KeyboardInterrupt: print('\n\nKeyboard Interrupt: cleaned up {} flows.'.format(len(nsock.shutdown()))) break - except TimeoutError: + except nDPIsrvd.SocketTimeout: stats.updateSpinner() stats.resetStatus() stats.printStatus() -- cgit v1.2.3