diff options
| author | Dave Borowitz <dborowitz@google.com> | 2015-01-02 13:58:05 -0800 |
|---|---|---|
| committer | Dave Borowitz <dborowitz@google.com> | 2015-01-02 13:58:05 -0800 |
| commit | 497bde4de500416fb428a8cd57b9c62708349924 (patch) | |
| tree | 3137a3ad894bbc60fbb28d05c21bc1d1e9a3e989 | |
| parent | 4abf8e6ef81e78469148b156ae2d2da70ace627a (diff) | |
| download | git-repo-497bde4de500416fb428a8cd57b9c62708349924.tar.gz | |
Respect --quiet when looking up bundle cookie filev1.12.17
Change-Id: I02a244132c49e4bb50ecda978974d6d2b220f6d1
| -rw-r--r-- | project.py | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -1947,7 +1947,7 @@ class Project(object): | |||
| 1947 | os.remove(tmpPath) | 1947 | os.remove(tmpPath) |
| 1948 | if 'http_proxy' in os.environ and 'darwin' == sys.platform: | 1948 | if 'http_proxy' in os.environ and 'darwin' == sys.platform: |
| 1949 | cmd += ['--proxy', os.environ['http_proxy']] | 1949 | cmd += ['--proxy', os.environ['http_proxy']] |
| 1950 | with self._GetBundleCookieFile(srcUrl) as cookiefile: | 1950 | with self._GetBundleCookieFile(srcUrl, quiet) as cookiefile: |
| 1951 | if cookiefile: | 1951 | if cookiefile: |
| 1952 | cmd += ['--cookie', cookiefile, '--cookie-jar', cookiefile] | 1952 | cmd += ['--cookie', cookiefile, '--cookie-jar', cookiefile] |
| 1953 | if srcUrl.startswith('persistent-'): | 1953 | if srcUrl.startswith('persistent-'): |
| @@ -1996,7 +1996,7 @@ class Project(object): | |||
| 1996 | return False | 1996 | return False |
| 1997 | 1997 | ||
| 1998 | @contextlib.contextmanager | 1998 | @contextlib.contextmanager |
| 1999 | def _GetBundleCookieFile(self, url): | 1999 | def _GetBundleCookieFile(self, url, quiet): |
| 2000 | if url.startswith('persistent-'): | 2000 | if url.startswith('persistent-'): |
| 2001 | try: | 2001 | try: |
| 2002 | p = subprocess.Popen( | 2002 | p = subprocess.Popen( |
| @@ -2021,7 +2021,7 @@ class Project(object): | |||
| 2021 | err_msg = p.stderr.read() | 2021 | err_msg = p.stderr.read() |
| 2022 | if ' -print_config' in err_msg: | 2022 | if ' -print_config' in err_msg: |
| 2023 | pass # Persistent proxy doesn't support -print_config. | 2023 | pass # Persistent proxy doesn't support -print_config. |
| 2024 | else: | 2024 | elif not quiet: |
| 2025 | print(err_msg, file=sys.stderr) | 2025 | print(err_msg, file=sys.stderr) |
| 2026 | except OSError as e: | 2026 | except OSError as e: |
| 2027 | if e.errno == errno.ENOENT: | 2027 | if e.errno == errno.ENOENT: |
