From 767717be0afce3bbc407408cfe8d5135786a6e35 Mon Sep 17 00:00:00 2001 From: begininvoke <56797886+begininvoke@users.noreply.github.com> Date: Wed, 19 Aug 2026 10:29:20 -0700 Subject: [PATCH] fix(security): the `encoding` argument to Popen is only available on Python 3.6+ --- cloudlab/bin/switch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)