[PATCH] D79169: lit googletest.py: Don't raise StopIteration to end generator function
Hans Wennborg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 30 06:12:56 PDT 2020
hans created this revision.
hans added a reviewer: thakis.
Herald added a subscriber: delcypher.
Herald added a project: LLVM.
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/).
https://reviews.llvm.org/D79169
Files:
llvm/utils/lit/lit/formats/googletest.py
Index: llvm/utils/lit/lit/formats/googletest.py
===================================================================
--- llvm/utils/lit/lit/formats/googletest.py
+++ llvm/utils/lit/lit/formats/googletest.py
@@ -41,7 +41,7 @@
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79169.261203.patch
Type: text/x-patch
Size: 546 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200430/6b8366bb/attachment.bin>
More information about the llvm-commits
mailing list