run-tests: rename `lcmd` variable to `line_cmd`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 14 Jun 2019 16:26:11 +0100
changeset 42869 5ca351ba2478
parent 42868 35ef1e957a62
child 42870 4257c33e24b7
run-tests: rename `lcmd` variable to `line_cmd` This is clearer and more in line with some other variable names. (This is a gratuitous cleanup that I made while investigating a bug).
tests/run-tests.py
--- a/tests/run-tests.py	Fri Jun 14 16:24:34 2019 +0100
+++ b/tests/run-tests.py	Fri Jun 14 16:26:11 2019 +0100
@@ -1612,9 +1612,9 @@
         pos = -1
         postout = []
         for out_rawline in output:
-            out_line, lcmd = out_rawline, None
+            out_line, cmd_line = out_rawline, None
             if salt in out_rawline:
-                out_line, lcmd = out_rawline.split(salt, 1)
+                out_line, cmd_line = out_rawline.split(salt, 1)
 
             while out_line:
                 if not out_line.endswith(b'\n'):
@@ -1695,15 +1695,15 @@
                                 continue
                     postout.append(b'  ' + el)
 
-            if lcmd:
+            if cmd_line:
                 # Add on last return code.
-                ret = int(lcmd.split()[1])
+                ret = int(cmd_line.split()[1])
                 if ret != 0:
                     postout.append(b'  [%d]\n' % ret)
                 if pos in after:
                     # Merge in non-active test bits.
                     postout += after.pop(pos)
-                pos = int(lcmd.split()[0])
+                pos = int(cmd_line.split()[0])
 
         if pos in after:
             postout += after.pop(pos)