Prepare repository for pep8
Change l variable to line in remote_client.py
Related-PROD: PRODX-4874
Change-Id: I30a5d7eaf954c5a77ec7f15fc3821e0ee4247270
(cherry picked from commit fbb27d2d1f3653af83650405f419d13ae0c39724)
(cherry picked from commit 2482f886927420a44f15ea2e4452005d857be0e2)
diff --git a/tempest/common/utils/linux/remote_client.py b/tempest/common/utils/linux/remote_client.py
index b68a879..3a6ee28 100644
--- a/tempest/common/utils/linux/remote_client.py
+++ b/tempest/common/utils/linux/remote_client.py
@@ -58,14 +58,14 @@
output = self.exec_command(command)
selected = []
pos = None
- for l in output.splitlines():
- if pos is None and l.find("TYPE") > 0:
- pos = l.find("TYPE")
+ for line in output.splitlines():
+ if pos is None and line.find("TYPE") > 0:
+ pos = line.find("TYPE")
# Show header line too
- selected.append(l)
+ selected.append(line)
# lsblk lists disk type in a column right-aligned with TYPE
- elif pos is not None and pos > 0 and l[pos:pos + 4] == "disk":
- selected.append(l)
+ elif pos is not None and pos > 0 and line[pos:pos + 4] == "disk":
+ selected.append(line)
if selected:
return "\n".join(selected)
@@ -111,9 +111,9 @@
def get_dns_servers(self):
cmd = 'cat /etc/resolv.conf'
resolve_file = self.exec_command(cmd).strip().split('\n')
- entries = (l.split() for l in resolve_file)
- dns_servers = [l[1] for l in entries
- if len(l) and l[0] == 'nameserver']
+ entries = (line.split() for line in resolve_file)
+ dns_servers = [line[1] for line in entries
+ if len(line) and line[0] == 'nameserver']
return dns_servers
def _renew_lease_udhcpc(self, fixed_ip=None):