[PATCH] python/osmo-python-tests[master]: tcp debugging: allow switching on TCP debug by env var

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Mon Feb 27 01:13:31 UTC 2017

Review at  https://gerrit.osmocom.org/1917

tcp debugging: allow switching on TCP debug by env var

Print monitoring info about TCP sockets when the env var

Makes it easy to enable it on jenkins without blowing up output of normal runs
"at home".

Change-Id: I46212d07a2c1be05672a37766457e6c98b68f90d
M osmopy/obscvty.py
1 file changed, 2 insertions(+), 1 deletion(-)

  git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/17/1917/1

diff --git a/osmopy/obscvty.py b/osmopy/obscvty.py
index e4df57d..f369527 100755
--- a/osmopy/obscvty.py
+++ b/osmopy/obscvty.py
@@ -19,6 +19,7 @@
 import re
 import socket
 import sys, subprocess
+import os
 """VTYInteract: interact with an osmocom vty
@@ -26,7 +27,7 @@
 Connections will be reestablished as necessary.
 Methods: __init__, command, enabled_command, verify, w_verify"""
-debug_tcp_sockets = False
+debug_tcp_sockets = 'OSMOPY_DEBUG_TCP_SOCKETS' in os.environ
 def cmd(what):
     print '\n> %s' % what

To view, visit https://gerrit.osmocom.org/1917
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I46212d07a2c1be05672a37766457e6c98b68f90d
Gerrit-PatchSet: 1
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>

More information about the gerrit-log mailing list