mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-01 23:05:39 +00:00
test: fix flake8 errors
The newest version of flake reports errors that variable names like 'l' should not be used, because they are hard to read. This changes 'l' to 'line' to make flake8 happy. Signed-off-by: Adrian Reber <areber@redhat.com>
This commit is contained in:
committed by
Andrei Vagin
parent
d23d1fc0f9
commit
be2ded15ee
@@ -2047,11 +2047,11 @@ def grep_errors(fname):
|
|||||||
print_next = False
|
print_next = False
|
||||||
before = []
|
before = []
|
||||||
with open(fname, errors='replace') as fd:
|
with open(fname, errors='replace') as fd:
|
||||||
for l in fd:
|
for line in fd:
|
||||||
before.append(l)
|
before.append(line)
|
||||||
if len(before) > 5:
|
if len(before) > 5:
|
||||||
before.pop(0)
|
before.pop(0)
|
||||||
if "Error" in l or "Warn" in l:
|
if "Error" in line or "Warn" in line:
|
||||||
if first:
|
if first:
|
||||||
print_fname(fname, 'log')
|
print_fname(fname, 'log')
|
||||||
print_sep("grep Error", "-", 60)
|
print_sep("grep Error", "-", 60)
|
||||||
@@ -2061,7 +2061,7 @@ def grep_errors(fname):
|
|||||||
before = []
|
before = []
|
||||||
else:
|
else:
|
||||||
if print_next:
|
if print_next:
|
||||||
print_next = print_error(l)
|
print_next = print_error(line)
|
||||||
before = []
|
before = []
|
||||||
if not first:
|
if not first:
|
||||||
print_sep("ERROR OVER", "-", 60)
|
print_sep("ERROR OVER", "-", 60)
|
||||||
|
Reference in New Issue
Block a user