Only use bz2 compression if bzip2 is available

This commit is contained in:
Kovid Goyal
2022-03-07 20:44:26 +05:30
parent 855718b179
commit 5e457da30b
3 changed files with 11 additions and 6 deletions

View File

@@ -60,7 +60,7 @@ def dcs_to_kitty(type, payload):
def send_data_request():
hostname = os.environ.get('HOSTNAME') or os.uname().nodename
write_all(tty_fd, dcs_to_kitty(
'ssh', 'id=REQUEST_ID:hostname={}:pwfile=PASSWORD_FILENAME:user={}:pw=DATA_PASSWORD'.format(hostname, getpass.getuser())))
'ssh', 'id=REQUEST_ID:hostname={}:pwfile=PASSWORD_FILENAME:user={}:compression=bz2:pw=DATA_PASSWORD'.format(hostname, getpass.getuser())))
def debug(msg):