From e20da3eeedf03dcffbb882ca10b159719f8e334d Mon Sep 17 00:00:00 2001 From: Mike Frysinger <vapier@google.com> Date: Sat, 7 Mar 2020 01:53:53 -0500 Subject: [PATCH] sync: fix os.environ logic errors This is a dict to index, not a function to call. Change-Id: I0117eeaaa8b2ef4762ab6f0d22f9ffdaee961f52 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/258132 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: David Pursehouse <dpursehouse@collab.net> --- subcmds/sync.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/subcmds/sync.py b/subcmds/sync.py index e2bc1d17..ae29f085 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py @@ -729,12 +729,12 @@ later is required to fix a server side protocol bug. branch = branch[len(R_HEADS):] if 'SYNC_TARGET' in os.environ: - target = os.environ('SYNC_TARGET') + target = os.environ['SYNC_TARGET'] [success, manifest_str] = server.GetApprovedManifest(branch, target) elif ('TARGET_PRODUCT' in os.environ and 'TARGET_BUILD_VARIANT' in os.environ): - target = '%s-%s' % (os.environ('TARGET_PRODUCT'), - os.environ('TARGET_BUILD_VARIANT')) + target = '%s-%s' % (os.environ['TARGET_PRODUCT'], + os.environ['TARGET_BUILD_VARIANT']) [success, manifest_str] = server.GetApprovedManifest(branch, target) else: [success, manifest_str] = server.GetApprovedManifest(branch)