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