From ddb2d1922f25bfc04ce8baf164259af6e7e6a725 Mon Sep 17 00:00:00 2001 From: Trinopoty Biswas Date: Sat, 20 Jan 2018 22:44:11 +0530 Subject: [PATCH] Fixed case where certificate does not currently exist --- .../certbot_installer_zimbra/installer.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/certbot-installer-zimbra/certbot_installer_zimbra/installer.py b/certbot-installer-zimbra/certbot_installer_zimbra/installer.py index 15a96e2ce..2a054d5a9 100644 --- a/certbot-installer-zimbra/certbot_installer_zimbra/installer.py +++ b/certbot-installer-zimbra/certbot_installer_zimbra/installer.py @@ -182,7 +182,12 @@ class ZimbraInstaller(common.Installer): :raises .PluginError: when save is unsuccessful """ - save_files = [self._zimbra_cert_crt, self._zimbra_cert_key, self._zimbra_cert_ca] + save_files = [] + if os.path.isfile(self._zimbra_cert_crt) and os.path.isfile(self._zimbra_cert_key): + save_files.append(self._zimbra_cert_crt) + save_files.append(self._zimbra_cert_key) + if os.path.isfile(self._zimbra_cert_ca): + save_files.append(self._zimbra_cert_ca) self.add_to_checkpoint(save_files, "", temporary) # Copy the certificate and deploy