cleanup etherlab: pylint, W0602 (global-variable-not-assigned) Using global for 'X' but no assignment is done
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Wed, 03 Oct 2018 12:07:56 +0300
changeset 2422 45aa510d7a2a
parent 2421 a5994ee1f6a7
child 2423 2c7b7ae24d57
cleanup etherlab: pylint, W0602 (global-variable-not-assigned) Using global for 'X' but no assignment is done
etherlab/runtime_etherlab.py
--- a/etherlab/runtime_etherlab.py	Wed Oct 03 11:48:05 2018 +0300
+++ b/etherlab/runtime_etherlab.py	Wed Oct 03 12:07:56 2018 +0300
@@ -65,7 +65,6 @@
 
 
 def GetResult():
-    global Result
     return Result
 
 
@@ -80,7 +79,6 @@
     Last 4 KB are polled, and lines compared to last
     captured line to detect new lines
     """
-    global StopKMSGThread
     libc = ctypes.CDLL("libc.so.6")
     klog = libc.klogctl
     klog.argtypes = [ctypes.c_int, ctypes.c_char_p, ctypes.c_int]
@@ -113,7 +111,7 @@
 
 
 def _runtime_etherlab_cleanup():
-    global KMSGPollThread, StopKMSGThread, SDOProc, SDOThread
+    global KMSGPollThread, StopKMSGThread, SDOThread
     try:
         os.kill(SDOProc.pid, signal.SIGTERM)
     except Exception: