improved_secure_mode

bzr revid: fp@tinyerp.com-20090315161913-7tb0weofaiwcflm9
This commit is contained in:
Fabien Pinckaers
2009-03-15 17:19:13 +01:00
parent 390357caf5
commit d5e724740b
2 changed files with 5 additions and 3 deletions
+1
View File
@@ -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)
+4 -3
View File
@@ -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]