From 497bde4de500416fb428a8cd57b9c62708349924 Mon Sep 17 00:00:00 2001 From: Dave Borowitz Date: Fri, 2 Jan 2015 13:58:05 -0800 Subject: [PATCH] Respect --quiet when looking up bundle cookie file Change-Id: I02a244132c49e4bb50ecda978974d6d2b220f6d1 --- project.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/project.py b/project.py index 6ed9f9d4..9af2d631 100644 --- a/project.py +++ b/project.py @@ -1947,7 +1947,7 @@ class Project(object): os.remove(tmpPath) if 'http_proxy' in os.environ and 'darwin' == sys.platform: cmd += ['--proxy', os.environ['http_proxy']] - with self._GetBundleCookieFile(srcUrl) as cookiefile: + with self._GetBundleCookieFile(srcUrl, quiet) as cookiefile: if cookiefile: cmd += ['--cookie', cookiefile, '--cookie-jar', cookiefile] if srcUrl.startswith('persistent-'): @@ -1996,7 +1996,7 @@ class Project(object): return False @contextlib.contextmanager - def _GetBundleCookieFile(self, url): + def _GetBundleCookieFile(self, url, quiet): if url.startswith('persistent-'): try: p = subprocess.Popen( @@ -2021,7 +2021,7 @@ class Project(object): err_msg = p.stderr.read() if ' -print_config' in err_msg: pass # Persistent proxy doesn't support -print_config. - else: + elif not quiet: print(err_msg, file=sys.stderr) except OSError as e: if e.errno == errno.ENOENT: