diff options
author | LaMont Jones <lamontjones@google.com> | 2022-11-08 00:54:56 +0000 |
---|---|---|
committer | LaMont Jones <lamontjones@google.com> | 2022-11-08 00:54:56 +0000 |
commit | 5fb9c6a5b35220e27b3acd5861318584588cd0d8 (patch) | |
tree | d3d3a7d6d021e1547d9f22875aea57a717540f92 /ssh.py | |
parent | 859d3d958057e35b618e8cca209a85317d49a974 (diff) | |
download | git-repo-5fb9c6a5b35220e27b3acd5861318584588cd0d8.tar.gz |
v2.29.7: Revert back to v2.29.5v2.29.7
This change reverts stable to v2.29.5, to fix clients that received
v2.29.6, and keep future updates simpler.
Change-Id: I2f5c52c466b7321665c9699ccdbf98f928483fee
Diffstat (limited to 'ssh.py')
-rw-r--r-- | ssh.py | 39 |
1 files changed, 19 insertions, 20 deletions
@@ -182,29 +182,28 @@ class ProxyManager: | |||
182 | # be important because we can't tell that that 'git@myhost.com' is the same | 182 | # be important because we can't tell that that 'git@myhost.com' is the same |
183 | # as 'myhost.com' where "User git" is setup in the user's ~/.ssh/config file. | 183 | # as 'myhost.com' where "User git" is setup in the user's ~/.ssh/config file. |
184 | check_command = command_base + ['-O', 'check'] | 184 | check_command = command_base + ['-O', 'check'] |
185 | with Trace('Call to ssh (check call): %s', ' '.join(check_command)): | 185 | try: |
186 | try: | 186 | Trace(': %s', ' '.join(check_command)) |
187 | check_process = subprocess.Popen(check_command, | 187 | check_process = subprocess.Popen(check_command, |
188 | stdout=subprocess.PIPE, | 188 | stdout=subprocess.PIPE, |
189 | stderr=subprocess.PIPE) | 189 | stderr=subprocess.PIPE) |
190 | check_process.communicate() # read output, but ignore it... | 190 | check_process.communicate() # read output, but ignore it... |
191 | isnt_running = check_process.wait() | 191 | isnt_running = check_process.wait() |
192 | 192 | ||
193 | if not isnt_running: | 193 | if not isnt_running: |
194 | # Our double-check found that the master _was_ infact running. Add to | 194 | # Our double-check found that the master _was_ infact running. Add to |
195 | # the list of keys. | 195 | # the list of keys. |
196 | self._master_keys[key] = True | 196 | self._master_keys[key] = True |
197 | return True | 197 | return True |
198 | except Exception: | 198 | except Exception: |
199 | # Ignore excpetions. We we will fall back to the normal command and | 199 | # Ignore excpetions. We we will fall back to the normal command and print |
200 | # print to the log there. | 200 | # to the log there. |
201 | pass | 201 | pass |
202 | 202 | ||
203 | command = command_base[:1] + ['-M', '-N'] + command_base[1:] | 203 | command = command_base[:1] + ['-M', '-N'] + command_base[1:] |
204 | p = None | ||
205 | try: | 204 | try: |
206 | with Trace('Call to ssh: %s', ' '.join(command)): | 205 | Trace(': %s', ' '.join(command)) |
207 | p = subprocess.Popen(command) | 206 | p = subprocess.Popen(command) |
208 | except Exception as e: | 207 | except Exception as e: |
209 | self._master_broken.value = True | 208 | self._master_broken.value = True |
210 | print('\nwarn: cannot enable ssh control master for %s:%s\n%s' | 209 | print('\nwarn: cannot enable ssh control master for %s:%s\n%s' |