Skip to content

Commit d337e40

Browse files
authored
bpo-14916: interactive fd is not always stdin
related to python#31006 merged bugfix following https://bugs.python.org/issue14916
1 parent f33e2c8 commit d337e40

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Parser/pegen_errors.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ get_error_line_from_tokenizer_buffers(Parser *p, Py_ssize_t lineno)
245245
* (multi-line) statement are stored in p->tok->interactive_src_start.
246246
* If not, we're parsing from a string, which means that the whole source
247247
* is stored in p->tok->str. */
248-
assert((p->tok->fp == NULL && p->tok->str != NULL) || p->tok->fp == stdin);
248+
assert((p->tok->fp == NULL && p->tok->str != NULL) || p->tok->fp != NULL);
249249

250250
char *cur_line = p->tok->fp_interactive ? p->tok->interactive_src_start : p->tok->str;
251251
if (cur_line == NULL) {

0 commit comments

Comments
 (0)