Skip to content

Commit

Permalink
ovs-bugtool: Fix ambiguous variable flake8 warnings
Browse files Browse the repository at this point in the history
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

Signed-off-by: Alin Gabriel Serdean <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
aserdean authored and blp committed Mar 8, 2018
1 parent c2104b9 commit 593e93e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions utilities/bugtool/ovs-bugtool.in
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 593e93e

Please sign in to comment.