summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--osprofiler/hacking/checks.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/osprofiler/hacking/checks.py b/osprofiler/hacking/checks.py
index b31a47d..2723210 100644
--- a/osprofiler/hacking/checks.py
+++ b/osprofiler/hacking/checks.py
@@ -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