Browse Source

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
tags/3.4.0^0
Manish Kumar 3 weeks ago
committed by Ghanshyam Mann
parent
commit
5d82a02507
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      osprofiler/hacking/checks.py

+ 4
- 1
osprofiler/hacking/checks.py View File

@@ -73,7 +73,10 @@ def skip_ignored_lines(func):
line = logical_line.strip()
if not line or line.startswith("#") or line.endswith("# noqa"):
return
yield next(func(logical_line, filename))
try:
yield next(func(logical_line, filename))
except StopIteration:
return

return wrapper



Loading…
Cancel
Save