From 14208f4c938ade527db32f5ea2a5793a36eafd8f Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 4 May 2021 15:31:51 -0400 Subject: [PATCH] sync: fix logic error with linkfile errors Make sure err_update_linkfiles is always initalized. Bug: https://crbug.com/gerrit/11008 Change-Id: I7bdd91f82507608ef967daf0fa0f9c859454e19f Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/305146 Reviewed-by: Raman Tenneti Tested-by: Mike Frysinger --- subcmds/sync.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subcmds/sync.py b/subcmds/sync.py index 31760e5c..9a09be65 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py @@ -986,9 +986,9 @@ later is required to fix a server side protocol bug. print('\nerror: Local checkouts *not* updated.', file=sys.stderr) sys.exit(1) - if not self.UpdateCopyLinkfileList(): + err_update_linkfiles = not self.UpdateCopyLinkfileList() + if err_update_linkfiles: err_event.set() - err_update_linkfiles = True if opt.fail_fast: print('\nerror: Local update copyfile or linkfile failed.', file=sys.stderr) sys.exit(1)