From 56396af3e5f4887c9efd7164a590834ef2511d8f Mon Sep 17 00:00:00 2001 From: tandrii Date: Fri, 17 Jun 2016 09:50:46 -0700 Subject: [PATCH] cit: print to stderr to allow piping from cit log cat. R=hinoka@chromium.org,stip@chromium.org BUG= Review-Url: https://codereview.chromium.org/2062053002 --- cit.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cit.py b/cit.py index aeab2e90c..a83caf7a9 100755 --- a/cit.py +++ b/cit.py @@ -56,8 +56,10 @@ def need_to_update(branch): def ensure_infra(branch): """Ensures that infra.git is present in ~/.chrome-infra.""" - print 'Fetching infra@%s into %s, may take a couple of minutes...' % ( - branch, TARGET_DIR) + sys.stderr.write( + 'Fetching infra@%s into %s, may take a couple of minutes...' % ( + branch, TARGET_DIR)) + sys.stderr.flush() if not os.path.isdir(TARGET_DIR): os.mkdir(TARGET_DIR) if not os.path.exists(os.path.join(TARGET_DIR, '.gclient')): @@ -69,6 +71,8 @@ def ensure_infra(branch): [sys.executable, GCLIENT, 'sync', '--revision', 'origin/%s' % (branch,)], cwd=TARGET_DIR, stdout=subprocess.PIPE) + sys.stderr.write(' done.\n') + sys.stderr.flush() def get_available_tools():