From 0ae9503a867955cf4818b9952fa73f1c04c55e37 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 4 May 2021 07:21:19 -0400 Subject: [PATCH] sync: fix print error when handling server error When converting this logic from print() to the output buffer, this error codepath should have dropped the use of the file= redirect. Bug: https://crbug.com/gerrit/14482 Change-Id: Ib484924a2031ba3295c1c1a5b9a2d816b9912279 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/305142 Reviewed-by: Raman Tenneti Tested-by: Mike Frysinger --- project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project.py b/project.py index 6679ee31..992a0c07 100644 --- a/project.py +++ b/project.py @@ -2205,7 +2205,7 @@ class Project(object): # Figure out how long to sleep before the next attempt, if there is one. if not verbose: - output_redir.write('\n%s:\n%s' % (self.name, gitcmd.stdout), file=sys.stderr) + output_redir.write('\n%s:\n%s' % (self.name, gitcmd.stdout)) if try_n < retry_fetches - 1: output_redir.write('sleeping %s seconds before retrying' % retry_cur_sleep) time.sleep(retry_cur_sleep)