plumbum icon indicating copy to clipboard operation
plumbum copied to clipboard

AttributeError: 'list' object has no attribute 'strip'

Open dspies-leapyear opened this issue 7 years ago • 3 comments

https://github.com/tomerfiliba/plumbum/blob/15ad91166219b1fead21efd21309fb4ab968f638/plumbum/machines/session.py#L228 seems to expect a str, but the call to cmd.formuate(1) https://github.com/tomerfiliba/plumbum/blob/15ad91166219b1fead21efd21309fb4ab968f638/plumbum/machines/session.py#L224 above returns a list.

dspies-leapyear avatar Feb 06 '18 16:02 dspies-leapyear

Any example piece of code where this bug (it does look like a bug) gets triggered?

henryiii avatar Feb 12 '18 14:02 henryiii

remote = SshMachine(...)
cmd = remote['echo']['hi']
sess = remote.session()
proc = sess.popen(cmd)

dspies-leapyear avatar Feb 12 '18 15:02 dspies-leapyear

@henryiii

from plumbum import local
from plumbum.cmd import ls
s = local.session()
s.run(ls)

AndydeCleyre avatar Feb 20 '19 18:02 AndydeCleyre