MCPcopy Create free account
hub / github.com/StackStorm/st2 / quote_unix

Function quote_unix

st2common/st2common/util/shell.py:138–149  ·  view source on GitHub ↗

Return a quoted (shell-escaped) version of the value which can be used as one token in a shell command line. :param value: Value to quote. :type value: ``str`` :rtype: ``str``

(value)

Source from the content-addressed store, hash-verified

136
137
138def quote_unix(value):
139 """
140 Return a quoted (shell-escaped) version of the value which can be used as one token in a shell
141 command line.
142
143 :param value: Value to quote.
144 :type value: ``str``
145
146 :rtype: ``str``
147 """
148 value = six.moves.shlex_quote(value)
149 return value
150
151
152def quote_windows(value):

Callers 15

runMethod · 0.90
runMethod · 0.90
service.pyFile · 0.90
test_quote_unixMethod · 0.90
putMethod · 0.90
mkdirMethod · 0.90
delete_fileMethod · 0.90
delete_dirMethod · 0.90
runMethod · 0.90
get_pack_base_pathFunction · 0.90
get_pack_directoryFunction · 0.90

Calls

no outgoing calls

Tested by 2

test_quote_unixMethod · 0.72