Skip to content

Commit dea35e4

Browse files
committed
gh-153569: avoid retaining duplicate reader input
1 parent 19d3ba4 commit dea35e4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Parser/tokenizer/reader.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ _PyTok_ReaderUnderflow(struct tok_state *tok)
565565
tok->input_error = 1;
566566
return 0;
567567
}
568-
if (!prepared &&
568+
if (tok->reader->kind == _PYTOK_READER_INTERACTIVE &&
569569
_PyTok_SourceAppendLine(&tok->source, chunk.data, chunk.len,
570570
chunk.implicit_newline) < 0) {
571571
_PyTok_ChunkClear(&chunk);

0 commit comments

Comments
 (0)