Branch 'dev/boddie-new/combined' - pykolab/setup

Paul Boddie boddie at kolabsys.com
Fri Sep 12 21:48:36 CEST 2014


 pykolab/setup/setup_mta.py |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit aed6436f32a4c17d047b359732e86c6091152001
Author: Paul Boddie <paul at boddie.org.uk>
Date:   Fri Sep 12 21:47:58 2014 +0200

    Fix check-only mode for an unconfigured MTA.

diff --git a/pykolab/setup/setup_mta.py b/pykolab/setup/setup_mta.py
index 73c21a8..94ec8fb 100644
--- a/pykolab/setup/setup_mta.py
+++ b/pykolab/setup/setup_mta.py
@@ -183,6 +183,7 @@ def _execute(*args, **kw):
     # Ask for details of the certificate, if appropriate.
 
     if (unset_certificate or conf.reset_postfix_config) and not conf.check_only:
+
         default_certificate_name = is_debian() and 'ssl-cert-snakeoil' or 'localhost'
 
         certificate_name = ask_question("kolab-conf/ssl-certificate-selection",
@@ -205,7 +206,7 @@ def _execute(*args, **kw):
     # inconsistency between usage of .pem and .key for the keys, but
     # certificates always seem to use .pem as their suffix.
 
-    missing_certificate = not isfile(current_certificate)
+    missing_certificate = not current_certificate or not isfile(current_certificate)
 
     if missing_certificate and not conf.check_only:
         make_ssl_certificate(current_key)




More information about the commits mailing list