On Mon, 1 Sep 2025 02:34:05 -0700 Breno Leitao wrote:
> 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.

Not sure how that'll interact with various shells..
I'd rather play it safe.

Reply via email to