gh-150213: Fix OOM error handling in _interpchannels by lpyu001 · Pull Request #150214 · python/cpython
Conversation
The runner was terminated during task execution. Could you please retrigger the failed job? Thank you. @aisk
| @@ -922,6 +922,7 @@ _channelends_new(void) | |||
| { | |||
| _channelends *ends = GLOBAL_MALLOC(_channelends); | |||
| if (ends== NULL) { | |||
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if (ends== NULL) { | |
| if (ends == NULL) { |
style change, while we are here
| try: | ||
| try: | ||
| cid = _channels.create(REPLACE) | ||
| except MemoryError: |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use with self.assertRaises(MemoryError):
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters