On Sat, Aug 30, 2025 at 11:43:17AM -0700, Jakub Kicinski wrote:
@@ -45,6 +48,10 @@ import time if host: self.proc = host.cmd(comm) else:
# If user doesn't explicitly request shell try to avoid it.
if shell is None and isinstance(comm, str) and ' ' in comm:
comm = comm.split()
I am wondering if you can always split the string, independently if shell is True or now. Passing comm as a list is usually recommend, even when shell is enabled. Also, if there is no space, split() will return the same string.
What about something as?
if isinstance(comm, str): comm = comm.split()