From a30219ad25caafd33a837c3d71f1bc0bcfd91067 Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Fri, 19 Dec 2008 01:06:50 +0100 Subject: [PATCH] [FIX] Use secure if necessary bzr revid: stephane@tinyerp.com-20081219000650-h454lhyj9juz0t25 --- bin/tools/config.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/bin/tools/config.py b/bin/tools/config.py index ff4568dd848..30f4902cb73 100644 --- a/bin/tools/config.py +++ b/bin/tools/config.py @@ -170,9 +170,16 @@ class configmanager(object): # the same for the pidfile if self.options['pidfile'] in ('None', 'False'): self.options['pidfile'] = False - - for arg in ('interface', 'port', 'db_name', 'db_user', 'db_password', 'db_host', - 'db_port', 'logfile', 'pidfile', 'secure', 'smtp_ssl', 'smtp_port', 'email_from', 'smtp_server', 'smtp_user', 'smtp_password', 'price_accuracy', 'netinterface', 'netport', 'db_maxconn', 'import_partial', 'addons_path'): + + keys = ['interface', 'port', 'db_name', 'db_user', 'db_password', 'db_host', + 'db_port', 'logfile', 'pidfile', 'smtp_ssl', 'smtp_port', + 'email_from', 'smtp_server', 'smtp_user', 'smtp_password', 'price_accuracy', + 'netinterface', 'netport', 'db_maxconn', 'import_partial', 'addons_path'] + + if hasSSL: + keys.append('secure') + + for arg in keys: if getattr(opt, arg): self.options[arg] = getattr(opt, arg)