diff --git a/awscliv2/interactive_process.py b/awscliv2/interactive_process.py index aed6863..6b97643 100644 --- a/awscliv2/interactive_process.py +++ b/awscliv2/interactive_process.py @@ -6,6 +6,8 @@ import subprocess import sys import threading +import socket +import platform from subprocess import Popen from typing import Sequence, TextIO @@ -64,7 +66,11 @@ def readall(self, process: Popen, stdin: TextIO) -> None: # type: ignore if self.finished: break - rlist = select.select([stdin], [], [], self.read_timeout)[0] + if platform.system() == "Windows": + rlist = select.select([socket.socket()], [], [], self.read_timeout)[0] + else: + rlist = select.select([stdin], [], [], self.read_timeout)[0] + if not rlist: continue