Skip to content

Commit b993be7

Browse files
committed
Issue #18408: parsetok() must not write into stderr on memory allocation error
The caller gets an error code and can raise a classic Python exception.
1 parent 881ea11 commit b993be7

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

Parser/parsetok.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ parsetok(struct tok_state *tok, grammar *g, int start, perrdetail *err_ret,
138138
int started = 0;
139139

140140
if ((ps = PyParser_New(g, start)) == NULL) {
141-
fprintf(stderr, "no mem for new parser\n");
142141
err_ret->error = E_NOMEM;
143142
PyTokenizer_Free(tok);
144143
return NULL;

0 commit comments

Comments
 (0)