More shell quote fixes. Darn it :-P

This commit is contained in:
Joshua Harlow 2012-02-17 22:51:41 -08:00
parent 0b51e1032e
commit 6b179b4d33

View File

@ -183,7 +183,9 @@ def shellquote(text):
for (srch, replace) in SHELL_QUOTE_REPLACERS.items():
text = text.replace(srch, replace)
if do_adjust or \
text.startswith((" ", "\t")) or text.endswith((" ", "\t")):
text.startswith((" ", "\t")) or \
text.endswith((" ", "\t")) or \
text.find("'") != -1:
text = SHELL_WRAPPER % (text)
return text