tcp debugging: allow switching on TCP debug by env var
Print monitoring info about TCP sockets when the env var OSMOPY_DEBUG_TCP_SOCKETS is present and not "0". Makes it easy to enable it on jenkins without blowing up output of normal runs "at home". Change-Id: I46212d07a2c1be05672a37766457e6c98b68f90d
This commit is contained in:
parent
f6ab3d8e9c
commit
2bdab3d291
|
@ -19,6 +19,7 @@
|
|||
import re
|
||||
import socket
|
||||
import sys, subprocess
|
||||
import os
|
||||
|
||||
"""VTYInteract: interact with an osmocom vty
|
||||
|
||||
|
@ -26,7 +27,7 @@ Specify a VTY to connect to, and run commands on it.
|
|||
Connections will be reestablished as necessary.
|
||||
Methods: __init__, command, enabled_command, verify, w_verify"""
|
||||
|
||||
debug_tcp_sockets = False
|
||||
debug_tcp_sockets = (os.getenv('OSMOPY_DEBUG_TCP_SOCKETS', '0') != '0')
|
||||
|
||||
def cmd(what):
|
||||
print '\n> %s' % what
|
||||
|
|
Loading…
Reference in New Issue