mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
xend: fix bug in option parsing
If you enable legacy tcp xmlrpc in xend's config but omit to enable ssl then a backtrace is generated when starting xend. Signed-off-by: Arnd Hannemann <hannemann@nets.rwth-aachen.de> xen-unstable changeset: 21265:71cf9b12ac9e xen-unstable date: Tue May 04 12:23:54 2010 +0100
This commit is contained in:
1 parent
d8c2c71f17
commit
d7be97a877
1 file changed
+4
-4
@@ -207,18 +207,18 @@ class XendOptions:
|
||||
def get_xend_tcp_xmlrpc_server_ssl_key_file(self):
|
||||
name = 'xend-tcp-xmlrpc-server-ssl-key-file'
|
||||
file = self.get_config_string(name)
|
||||
if os.path.dirname(file) == "":
|
||||
if file and os.path.dirname(file) == "":
|
||||
file = auxbin.xen_configdir() + '/' + file;
|
||||
if not os.path.exists(file):
|
||||
if file and not os.path.exists(file):
|
||||
raise XendError("invalid xend config %s: directory '%s' does not exist" % (name, file))
|
||||
return file
|
||||
|
||||
def get_xend_tcp_xmlrpc_server_ssl_cert_file(self):
|
||||
name = 'xend-tcp-xmlrpc-server-ssl-cert-file'
|
||||
file = self.get_config_string(name)
|
||||
if os.path.dirname(file) == "":
|
||||
if file and os.path.dirname(file) == "":
|
||||
file = auxbin.xen_configdir() + '/' + file;
|
||||
if not os.path.exists(file):
|
||||
if file and not os.path.exists(file):
|
||||
raise XendError("invalid xend config %s: directory '%s' does not exist" % (name, file))
|
||||
return file
|
||||
|
||||
|
||||