diff options
Diffstat (limited to 'project.py')
| -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: |
