Bug 944551 - Handle unicode in mozbuild.util.shell_quote. r=gps

This commit is contained in:
Mike Hommey 2013-11-30 18:46:13 +09:00
parent 84fbed6ac4
commit ff3c3e3db5

View File

@ -602,4 +602,5 @@ def shell_quote(s):
# Single quoted strings can contain any characters unescaped except the
# single quote itself, which can't even be escaped, so the string needs to
# be closed, an escaped single quote added, and reopened.
return "'%s'" % s.replace("'", "'\\''")
t = type(s)
return t("'%s'") % s.replace(t("'"), t("'\\''"))