Really fix shell quoting, quoting single quotes correctly.
This commit is contained in:
parent
6e2433aa00
commit
b8d2d81d00
|
@ -270,8 +270,9 @@ def tmpfile (dir=None, prefix="temp", suffix=None):
|
|||
|
||||
|
||||
def shell_quote (value):
|
||||
"""Quote all shell metacharacters in given string value."""
|
||||
return "'%s'" % value.replace("'", r"\'")
|
||||
"""Quote all shell metacharacters in given string value with strong
|
||||
(ie. single) quotes, handling the single quote especially."""
|
||||
return "'%s'" % value.replace("'", r"'\''")
|
||||
|
||||
|
||||
def stripext (filename):
|
||||
|
|
Loading…
Reference in New Issue