File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -602,13 +602,10 @@ def main():
602602 func (f , sys .stdout .buffer )
603603 else :
604604 if sys .stdin .isatty ():
605- # gh-gh-138775: read input data at once when reading from stdin
606- # This allows proper handling of EOF (Ctrl+D)
607- input_data = sys .stdin .buffer .read ()
608- if input_data :
609- import io
610- input_buffer = io .BytesIO (input_data )
611- func (input_buffer , sys .stdout .buffer )
605+ # gh-138775: read input data at once when reading from stdin.
606+ import io
607+ data = sys .stdin .buffer .read ()
608+ func (io .BytesIO (data ), sys .stdout .buffer )
612609 else :
613610 # keep the old behaviour for non-interactive input
614611 func (sys .stdin .buffer , sys .stdout .buffer )
Original file line number Diff line number Diff line change 1- Fix: handle "python -m base64" stdin correct with EOF single .
1+ :mod: ` base64 `: fix reading from stdin for the command-line interface .
You can’t perform that action at this time.
0 commit comments