Commit 55156559 authored by maruel@chromium.org's avatar maruel@chromium.org

Fix subprocess2.Popen() logging when given a string

R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/8361006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@106706 0039d316-1c4b-4281-b951-d872f2087c98
parent 6c48a304
......@@ -158,7 +158,12 @@ def Popen(args, **kwargs):
# with a list because it only tries to execute the first item in the list.
kwargs['shell'] = bool(sys.platform=='win32')
tmp_str = ' '.join(args)
if isinstance(args, basestring):
tmp_str = args
elif isinstance(args, (list, tuple)):
tmp_str = ' '.join(args)
else:
raise CalledProcessError(None, args, kwargs.get('cwd'), None, None)
if kwargs.get('cwd', None):
tmp_str += '; cwd=%s' % kwargs['cwd']
logging.debug(tmp_str)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment