diff --git a/tools/chromeos/merge_bot b/tools/chromeos/merge_bot index d6420cbe92..cedeb6ad72 100755 --- a/tools/chromeos/merge_bot +++ b/tools/chromeos/merge_bot @@ -176,7 +176,7 @@ def setup_tracking_branch(branch_name: str, tracking: str): def gerrit_prerequisites(): "Make sure we can upload to gerrit." # Make sure we have http cookies to access gerrit - cookie_file = git("config http.cookiefile").stdout() + cookie_file = git("config http.cookiefile").stdout(check=False) if not cookie_file: if is_gce_instance(): # Grab http cookies for accessing GOB. See go/gob-gce diff --git a/tools/impl/common.py b/tools/impl/common.py index ebbc8056f0..bf8ab31cdd 100644 --- a/tools/impl/common.py +++ b/tools/impl/common.py @@ -180,11 +180,11 @@ class Command(object): raise subprocess.CalledProcessError(result.returncode, str(self), result.stdout) return result.returncode - def stdout(self): + def stdout(self, check: bool = True): """ Runs a program and returns stdout. Stderr is still directed to the user. """ - return self.run(stderr=None).stdout.strip() + return self.run(stderr=None, check=check).stdout.strip() def lines(self): """