python: Use Python 3.8 shlex.join function.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2022-04-26 17:10:28 -07:00
committed by Tim Abbott
parent 71390fb635
commit 098a514599
7 changed files with 11 additions and 31 deletions

View File

@@ -67,9 +67,7 @@ def webathena_kerberos_login(
api_key,
base64.b64encode(ccache).decode(),
]
subprocess.check_call(
["ssh", settings.PERSONAL_ZMIRROR_SERVER, "--", " ".join(map(shlex.quote, command))]
)
subprocess.check_call(["ssh", settings.PERSONAL_ZMIRROR_SERVER, "--", shlex.join(command)])
except subprocess.CalledProcessError:
logging.exception("Error updating the user's ccache", stack_info=True)
raise JsonableError(_("We were unable to set up mirroring for you"))