From 1b576697719919c32d778ce2d80b0d7431c70a07 Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Thu, 9 Jun 2022 11:51:57 -0700 Subject: [PATCH] restore-backup: Switch to run() to check exit codes. --- scripts/setup/restore-backup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/setup/restore-backup b/scripts/setup/restore-backup index d70c1daefa..de0f43781c 100755 --- a/scripts/setup/restore-backup +++ b/scripts/setup/restore-backup @@ -31,7 +31,7 @@ def restore_backup(tarball_file: IO[bytes]) -> None: # next). Ignore errors if zulip-backup/settings is not present # (E.g. because this is a development backup). tarball_file.seek(0, 0) - subprocess.call( + run( ["tar", "--directory=/etc/zulip", "--strip-components=2", "-xz", "zulip-backup/settings"], stdin=tarball_file, ) @@ -107,7 +107,7 @@ def restore_backup(tarball_file: IO[bytes]) -> None: if settings.PRODUCTION: # In case we are restoring a backup from an older Zulip # version, there may be new secrets to generate. - subprocess.check_call( + run( [ os.path.join(settings.DEPLOY_ROOT, "scripts", "setup", "generate_secrets.py"), "--production",