From 3b9ea6674fe8cbf4dd2a3f6fb964998df704c495 Mon Sep 17 00:00:00 2001 From: Mark Cottman-Fields Date: Sun, 28 May 2023 19:43:24 +1000 Subject: [PATCH] fix: also allow return code 0 for gpg import --- install_xpdf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install_xpdf.py b/install_xpdf.py index 7967e05..6f97e33 100644 --- a/install_xpdf.py +++ b/install_xpdf.py @@ -161,8 +161,8 @@ def _gpg_verify( self._path_to_str(key_path), ] result_import = subprocess.run(cmd_import, capture_output=True) - expected_import_return_code = 2 - if result_import.returncode != expected_import_return_code: + expected_import_return_codes = [0, 2] + if result_import.returncode not in expected_import_return_codes: logger.warning("Unexpected return code '%s'.", result_import) # expecting return code 2 because there is no ultimately trusted key return False