[PATCH] python/osmo-python-tests[master]: debug_tcp_sockets: clearly mark as global var

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


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

debug_tcp_sockets: clearly mark as global var

Change-Id: I56e26590ea380c7deab7ce132d688b37eb2d11a3
---
M osmopy/obscvty.py
1 file changed, 3 insertions(+), 0 deletions(-)


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

diff --git a/osmopy/obscvty.py b/osmopy/obscvty.py
index a517a5f..b09d108 100755
--- a/osmopy/obscvty.py
+++ b/osmopy/obscvty.py
@@ -39,6 +39,7 @@
     sys.stdout.flush()
 
 def print_used_tcp_sockets():
+    global debug_tcp_sockets
     if not debug_tcp_sockets:
         return
     cmd('ls /proc/self/fd');
@@ -68,6 +69,7 @@
         self.last_node = ''
 
     def _close_socket(self):
+        global debug_tcp_sockets
         if self.socket:
             if debug_tcp_sockets:
                 VTYInteract.all_sockets.remove(self.socket)
@@ -131,6 +133,7 @@
         return 0
 
     def _common_command(self, request, close=False, ends=None):
+        global debug_tcp_sockets
         if not ends:
             ends = [self.norm_end, self.priv_end]
         if not self.socket:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I56e26590ea380c7deab7ce132d688b37eb2d11a3
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