diff --git a/bin/openerp-server.py b/bin/openerp-server.py index a3d14ddfae1..600683cdf80 100755 --- a/bin/openerp-server.py +++ b/bin/openerp-server.py @@ -149,6 +149,7 @@ if tools.config["stop_after_init"]: if tools.config['xmlrpc']: port = int(tools.config['port']) interface = tools.config["interface"] + print tools.config['secure'] secure = tools.config["secure"] httpd = netsvc.HttpDaemon(interface, port, secure) diff --git a/bin/tools/config.py b/bin/tools/config.py index dbb8e270944..673e7cdd2ad 100644 --- a/bin/tools/config.py +++ b/bin/tools/config.py @@ -115,8 +115,8 @@ class configmanager(object): help="specify the level at which a failed assertion will stop the server. Accepted values: %s" % (self._LOGLEVELS.keys(),)) if hasSSL: group = optparse.OptionGroup(parser, "SSL Configuration") - group.add_option("-S", "--secure", dest="secure", action="store_true", - help="launch server over https instead of http", default=False) + group.add_option("-S", "--secure", dest="secure", + help="launch server over https instead of http") group.add_option("--cert-file", dest="secure_cert_file", default="server.cert", help="specify the certificate file for the SSL connection") @@ -233,7 +233,8 @@ class configmanager(object): keys.append('secure') for arg in keys: - self.options[arg] = getattr(opt, arg) + if getattr(opt, arg) is not None: + self.options[arg] = getattr(opt, arg) if opt.assert_exit_level: self.options['assert_exit_level'] = self._LOGLEVELS[opt.assert_exit_level]