From daa673eff1332c4cd1d964670639104ec85bcb13 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 15 Mar 2022 15:51:49 +0530 Subject: [PATCH] Make usage of need_to_request_data clearer --- kittens/ssh/main.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kittens/ssh/main.py b/kittens/ssh/main.py index cceffb3b4..8f5b7bcc6 100644 --- a/kittens/ssh/main.py +++ b/kittens/ssh/main.py @@ -571,14 +571,13 @@ def run_ssh(ssh_args: List[str], server_args: List[str], found_extra_args: Tuple if use_control_master: cmd[insertion_point:insertion_point] = connection_sharing_args(host_opts, int(os.environ['KITTY_PID'])) use_kitty_askpass = host_opts.askpass == 'native' or (host_opts.askpass == 'unless-set' and 'SSH_ASKPASS' not in os.environ) + need_to_request_data = True if use_kitty_askpass: # SSH_ASKPASS_REQUIRE was introduced in 8.4 release on 2020-09-27 if os.environ.get('DISPLAY') or ssh_version() >= (8, 4): + need_to_request_data = False os.environ['SSH_ASKPASS_REQUIRE'] = 'force' os.environ['SSH_ASKPASS'] = os.path.join(shell_integration_dir, 'ssh', 'askpass.py') - else: - use_kitty_askpass = False - need_to_request_data = not use_kitty_askpass with restore_terminal_state() as echo_on: rcmd, replacements, shm_name = get_remote_command( remote_args, host_opts, hostname, hostname_for_match, uname, echo_on, request_data=need_to_request_data)