Skip to content

Commit 88aad9b

Browse files
committed
lit googletest.py: Don't raise StopIteration in generator
The intention here seems to be to end the generator function, but with modern Python, raising StopIteration causes a runtime error (https://www.python.org/dev/peps/pep-0479/). Differential revision: https://reviews.llvm.org/D79169
1 parent 292058a commit 88aad9b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/utils/lit/lit/formats/googletest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def getGTestTests(self, path, litConfig, localConfig):
4141
litConfig.warning(
4242
"unable to discover google-tests in %r: %s. Process output: %s"
4343
% (path, sys.exc_info()[1], exc.output))
44-
raise StopIteration
44+
return
4545

4646
nested_tests = []
4747
for ln in output.splitlines(False): # Don't keep newlines.

0 commit comments

Comments
 (0)