From: Victor Stinner Date: Thu, 11 Jul 2013 21:17:33 +0000 (+0200) Subject: Issue #18408: parsetok() must not write into stderr on memory allocation error X-Git-Tag: v3.4.0a1~246 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=526daabf341a2e0e5c2624ebcf82968bd48b5019;p=python 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. --- diff --git a/Parser/parsetok.c b/Parser/parsetok.c index 7abc612831..d61ba924b5 100644 --- a/Parser/parsetok.c +++ b/Parser/parsetok.c @@ -138,7 +138,6 @@ parsetok(struct tok_state *tok, grammar *g, int start, perrdetail *err_ret, int started = 0; if ((ps = PyParser_New(g, start)) == NULL) { - fprintf(stderr, "no mem for new parser\n"); err_ret->error = E_NOMEM; PyTokenizer_Free(tok); return NULL;