Skip to content

Commit 4d99a25

Browse files
committed
Stop using twisted.internet.defer.returnValue
`defer.returnValue` was only needed in Python 2; in Python 3, a simple `return` is fine. `twisted.internet.defer.returnValue` is deprecated as of Twisted 24.7.0.
1 parent 8a2c0a0 commit 4d99a25

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

testtools/twistedsupport/_runtest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ def _run_cleanups(self):
335335
exc_info = sys.exc_info()
336336
self.case._report_traceback(exc_info)
337337
last_exception = exc_info[1]
338-
defer.returnValue(last_exception)
338+
return last_exception
339339

340340
def _make_spinner(self):
341341
"""Make the `Spinner` to be used to run the tests."""

0 commit comments

Comments
 (0)