Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(713)

Unified Diff: gclient.py

Issue 1851283002: Fix coloring madness in depot_tools. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Improve logic a bit Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « depot-tools-auth.py ('k') | git_cl.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient.py
diff --git a/gclient.py b/gclient.py
index aae6783f476dda86854959c633d3238f6bb4c155..5a40321f19181f9fc4c7c2d0475533f31c9dd132 100755
--- a/gclient.py
+++ b/gclient.py
@@ -102,7 +102,7 @@ import git_cache
from third_party.repo.progress import Progress
import subcommand
import subprocess2
-from third_party import colorama
+import setup_color
CHROMIUM_SRC_URL = 'https://chromium.googlesource.com/chromium/src.git'
@@ -1511,7 +1511,7 @@ been automagically updated. The previous version is available at %s.old.
revision_overrides = self._EnforceRevisions()
pm = None
# Disable progress for non-tty stdout.
- if (sys.stdout.isatty() and not self._options.verbose and progress):
+ if (setup_color.IS_TTY and not self._options.verbose and progress):
if command in ('update', 'revert'):
pm = Progress('Syncing projects', 1)
elif command == 'recurse':
@@ -2303,7 +2303,7 @@ def main(argv):
return 2
fix_encoding.fix_encoding()
disable_buffering()
- colorama.init(wrap="TERM" not in os.environ)
+ setup_color.init()
dispatcher = subcommand.CommandDispatcher(__name__)
try:
return dispatcher.execute(OptionParser(), argv)
« no previous file with comments | « depot-tools-auth.py ('k') | git_cl.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698