From 526daabf341a2e0e5c2624ebcf82968bd48b5019 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 11 Jul 2013 23:17:33 +0200 Subject: 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. --- Parser/parsetok.c | 1 - 1 file changed, 1 deletion(-) diff --git a/Parser/parsetok.c b/Parser/parsetok.c index 7abc612..d61ba92 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; -- cgit v0.12