From 5fb9c6a5b35220e27b3acd5861318584588cd0d8 Mon Sep 17 00:00:00 2001 From: LaMont Jones Date: Tue, 8 Nov 2022 00:54:56 +0000 Subject: v2.29.7: Revert back to v2.29.5 This change reverts stable to v2.29.5, to fix clients that received v2.29.6, and keep future updates simpler. Change-Id: I2f5c52c466b7321665c9699ccdbf98f928483fee --- ssh.py | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) (limited to 'ssh.py') diff --git a/ssh.py b/ssh.py index 004fdbad..450383dc 100644 --- a/ssh.py +++ b/ssh.py @@ -182,29 +182,28 @@ class ProxyManager: # be important because we can't tell that that 'git@myhost.com' is the same # as 'myhost.com' where "User git" is setup in the user's ~/.ssh/config file. check_command = command_base + ['-O', 'check'] - with Trace('Call to ssh (check call): %s', ' '.join(check_command)): - try: - check_process = subprocess.Popen(check_command, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE) - check_process.communicate() # read output, but ignore it... - isnt_running = check_process.wait() - - if not isnt_running: - # Our double-check found that the master _was_ infact running. Add to - # the list of keys. - self._master_keys[key] = True - return True - except Exception: - # Ignore excpetions. We we will fall back to the normal command and - # print to the log there. - pass + try: + Trace(': %s', ' '.join(check_command)) + check_process = subprocess.Popen(check_command, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + check_process.communicate() # read output, but ignore it... + isnt_running = check_process.wait() + + if not isnt_running: + # Our double-check found that the master _was_ infact running. Add to + # the list of keys. + self._master_keys[key] = True + return True + except Exception: + # Ignore excpetions. We we will fall back to the normal command and print + # to the log there. + pass command = command_base[:1] + ['-M', '-N'] + command_base[1:] - p = None try: - with Trace('Call to ssh: %s', ' '.join(command)): - p = subprocess.Popen(command) + Trace(': %s', ' '.join(command)) + p = subprocess.Popen(command) except Exception as e: self._master_broken.value = True print('\nwarn: cannot enable ssh control master for %s:%s\n%s' -- cgit v1.2.3-54-g00ecf