File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ def main(argv):
5656import inspect
5757import json
5858import os
59+ import pipes
5960import re
6061import shlex
6162import sys
@@ -232,7 +233,7 @@ def _IsHelpShortcut(component_trace, remaining_args):
232233 component_trace .show_help = True
233234 command = '{cmd} -- --help' .format (cmd = component_trace .GetCommand ())
234235 print ('INFO: Showing help with the command {cmd}.\n ' .format (
235- cmd = six . moves . shlex_quote (command )), file = sys .stderr )
236+ cmd = pipes . quote (command )), file = sys .stderr )
236237 return show_help
237238
238239
@@ -264,7 +265,7 @@ def _DisplayError(component_trace):
264265 if help_flag in component_trace .elements [- 1 ].args :
265266 command = '{cmd} -- --help' .format (cmd = component_trace .GetCommand ())
266267 message = 'INFO: Showing help with the command {cmd}.\n ' .format (
267- cmd = six . moves . shlex_quote (command ))
268+ cmd = pipes . quote (command ))
268269 output .append (message )
269270 output .append ('Fire trace:\n {trace}\n ' .format (trace = component_trace ))
270271 result = component_trace .GetResult ()
Original file line number Diff line number Diff line change 2929from __future__ import division
3030from __future__ import print_function
3131
32+ import pipes
33+
3234from fire import inspectutils
33- import six
3435
3536INITIAL_COMPONENT = 'Initial component'
3637INSTANTIATED_CLASS = 'Instantiated class'
@@ -165,8 +166,8 @@ def display(arg1, arg2='!'):
165166 def _Quote (self , arg ):
166167 if arg .startswith ('--' ) and '=' in arg :
167168 prefix , value = arg .split ('=' , 1 )
168- return six . moves . shlex_quote (prefix ) + '=' + six . moves . shlex_quote (value )
169- return six . moves . shlex_quote (arg )
169+ return pipes . quote (prefix ) + '=' + pipes . quote (value )
170+ return pipes . quote (arg )
170171
171172 def GetCommand (self ):
172173 """Returns the command representing the trace up to this point.
You can’t perform that action at this time.
0 commit comments