Skip to content

Commit

Permalink
lit googletest.py: Don't raise StopIteration in generator
Browse files Browse the repository at this point in the history
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
  • Loading branch information
zmodem committed Apr 30, 2020
1 parent 292058a commit 88aad9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/utils/lit/lit/formats/googletest.py
Expand Up @@ -41,7 +41,7 @@ def getGTestTests(self, path, litConfig, localConfig):
litConfig.warning(
"unable to discover google-tests in %r: %s. Process output: %s"
% (path, sys.exc_info()[1], exc.output))
raise StopIteration
return

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

0 comments on commit 88aad9b

Please sign in to comment.