ovs-bugtool: Fix ambiguous variable flake8 warnings
Flake8 complains:
utilities/bugtool/ovs-bugtool.in:761:5: E741 ambiguous variable name 'l'
utilities/bugtool/ovs-bugtool.in:1162:5: E741 ambiguous variable name 'l'
Makefile:6193: recipe for target 'flake8-check' failed
@@ -758,10 +758,10 @@ exclude those logs from the archive.
def dump_scsi_hosts(cap):
output = ''
- l = os.listdir('/sys/class/scsi_host')
- l.sort()
+ scsi_list = os.listdir('/sys/class/scsi_host')
+ scsi_list.sort()
- for h in l:
+ for h in scsi_list:
procname = ''
try:
f = open('/sys/class/scsi_host/%s/proc_name' % h)
@@ -1159,9 +1159,9 @@ def update_cap_size(cap, size):
def update_cap(cap, k, v):
global caps
- l = list(caps[cap])
- l[k] = v
- caps[cap] = tuple(l)
+ temp = list(caps[cap])
+ temp[k] = v
+ caps[cap] = tuple(temp)
def size_of_dir(d, pattern=None, negate=False):
