Message281814
| Author |
serhiy.storchaka |
| Recipients |
cool-RR, pitrou, serhiy.storchaka |
| Date |
2016年11月27日.10:09:11 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1480241351.54.0.390463132153.issue28811@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
This will break any code that pass str(path) to API that doesn't support pathlib.
In your case you can introduce a short alias:
q = shlex.quote
ssh_client.run(f'/bin/rm {q(str(path))}')
Or add more convenient helper:
def q(path):
return shlex.quote(str(path))
ssh_client.run(f'/bin/rm {q(path)}') |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2016年11月27日 10:09:11 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, pitrou, cool-RR |
| 2016年11月27日 10:09:11 | serhiy.storchaka | set | messageid: <1480241351.54.0.390463132153.issue28811@psf.upfronthosting.co.za> |
| 2016年11月27日 10:09:11 | serhiy.storchaka | link | issue28811 messages |
| 2016年11月27日 10:09:11 | serhiy.storchaka | create |
|