diff options
-rw-r--r-- | manifest_xml.py | 1 | ||||
-rw-r--r-- | project.py | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/manifest_xml.py b/manifest_xml.py index 817a1c80..e40e6fac 100644 --- a/manifest_xml.py +++ b/manifest_xml.py | |||
@@ -45,6 +45,7 @@ class _Default(object): | |||
45 | """Project defaults within the manifest.""" | 45 | """Project defaults within the manifest.""" |
46 | 46 | ||
47 | revisionExpr = None | 47 | revisionExpr = None |
48 | destBranchExpr = None | ||
48 | remote = None | 49 | remote = None |
49 | sync_j = 1 | 50 | sync_j = 1 |
50 | sync_c = False | 51 | sync_c = False |
@@ -1831,17 +1831,22 @@ class Project(object): | |||
1831 | ['git-remote-persistent-https', '-print_config', url], | 1831 | ['git-remote-persistent-https', '-print_config', url], |
1832 | stdin=subprocess.PIPE, stdout=subprocess.PIPE, | 1832 | stdin=subprocess.PIPE, stdout=subprocess.PIPE, |
1833 | stderr=subprocess.PIPE) | 1833 | stderr=subprocess.PIPE) |
1834 | p.stdin.close() # Tell subprocess it's ok to close. | ||
1834 | prefix = 'http.cookiefile=' | 1835 | prefix = 'http.cookiefile=' |
1836 | cookiefile = None | ||
1835 | for line in p.stdout: | 1837 | for line in p.stdout: |
1836 | line = line.strip() | 1838 | line = line.strip() |
1837 | if line.startswith(prefix): | 1839 | if line.startswith(prefix): |
1838 | return line[len(prefix):] | 1840 | cookiefile = line[len(prefix):] |
1841 | break | ||
1839 | if p.wait(): | 1842 | if p.wait(): |
1840 | line = iter(p.stderr).next() | 1843 | line = iter(p.stderr).next() |
1841 | if ' -print_config' in line: | 1844 | if ' -print_config' in line: |
1842 | pass # Persistent proxy doesn't support -print_config. | 1845 | pass # Persistent proxy doesn't support -print_config. |
1843 | else: | 1846 | else: |
1844 | print(line + p.stderr.read(), file=sys.stderr) | 1847 | print(line + p.stderr.read(), file=sys.stderr) |
1848 | if cookiefile: | ||
1849 | return cookiefile | ||
1845 | except OSError as e: | 1850 | except OSError as e: |
1846 | if e.errno == errno.ENOENT: | 1851 | if e.errno == errno.ENOENT: |
1847 | pass # No persistent proxy. | 1852 | pass # No persistent proxy. |