Fix StopIteration error on Ubuntu Focal
As per victoria cycle testing runtime and community goal, we need to migrate upstream CI/CD to Ubuntu Focal(20.04). StopIteration error happening in pep8 job when running on Focal. we can see the failure in https://review.opendev.org/#/c/744331/ Change-Id: Iecdd3bfddb95adec77f8581f844cfc74ca59fc73 Story: #2007865 Task: #402207
This commit is contained in:
parent
6ff0187d33
commit
5d82a02507
|
@ -73,7 +73,10 @@ def skip_ignored_lines(func):
|
||||||
line = logical_line.strip()
|
line = logical_line.strip()
|
||||||
if not line or line.startswith("#") or line.endswith("# noqa"):
|
if not line or line.startswith("#") or line.endswith("# noqa"):
|
||||||
return
|
return
|
||||||
yield next(func(logical_line, filename))
|
try:
|
||||||
|
yield next(func(logical_line, filename))
|
||||||
|
except StopIteration:
|
||||||
|
return
|
||||||
|
|
||||||
return wrapper
|
return wrapper
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue