depot_tools: Don't use basestring in scm.CaptureStatus.

basestring doesn't exist in Python 3. scm.Capture status doesn't need to support strings either.

Bug: 1002209
Change-Id: Ie9edfdfd09b789bfaace038a6ad8f3a7da344bc4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1890925
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
changes/25/1890925/2
Edward Lemur 6 years ago committed by Commit Bot
parent 0f99337018
commit c9144527d9

@ -121,7 +121,7 @@ class GIT(object):
def CaptureStatus(files, cwd, upstream_branch):
"""Returns git status.
@files can be a string (one file) or a list of files.
@files is a list of files.
Returns an array of (status, file) tuples."""
if upstream_branch is None:
@ -130,11 +130,7 @@ class GIT(object):
raise gclient_utils.Error('Cannot determine upstream branch')
command = ['-c', 'core.quotePath=false', 'diff',
'--name-status', '--no-renames', '-r', '%s...' % upstream_branch]
if not files:
pass
elif isinstance(files, basestring):
command.append(files)
else:
if files:
command.extend(files)
status = GIT.Capture(command, cwd)
results = []

Loading…
Cancel
Save