diff --git a/cloudlab/bin/switch.py b/cloudlab/bin/switch.py index 777d7c2b..a73f52fa 100755 --- a/cloudlab/bin/switch.py +++ b/cloudlab/bin/switch.py @@ -24,7 +24,7 @@ def __init__(self, verbose=False): self.ssh = subprocess.Popen(["ssh", "-T", "-p", "51295", "-o", "HostKeyAlgorithms=+ssh-rsa", "-o", "PubkeyAcceptedKeyTypes=+ssh-rsa", "admin@localhost"], - encoding="utf-8", stdin=subprocess.PIPE, stdout=subprocess.PIPE, + universal_newlines=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) fl = fcntl.fcntl(self.ssh.stdout, fcntl.F_GETFL) fcntl.fcntl(self.ssh.stdout, fcntl.F_SETFL, fl | os.O_NONBLOCK)