[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] xend: Map re.compile on hosts_allow for XMLRPCServer.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1175531640 -3600
# Node ID 870133a06f43b72c12370a90dfaccc89e0d980e5
# Parent  8cf85d3f4f5f82433f5d4ed84525be37f17ccdf0
xend: Map re.compile on hosts_allow for XMLRPCServer.

Changeset 14601 removed a re.compile() map on hosts_allow,
hence breaking the tcp xmlrpc api ('str' has no attribute match
in xend-debug.log).

From: Pascal Bouchareine <pascal@xxxxxxxxx>
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 tools/python/xen/xend/server/SrvServer.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -r 8cf85d3f4f5f -r 870133a06f43 tools/python/xen/xend/server/SrvServer.py
--- a/tools/python/xen/xend/server/SrvServer.py Mon Apr 02 16:59:00 2007 +0100
+++ b/tools/python/xen/xend/server/SrvServer.py Mon Apr 02 17:34:00 2007 +0100
@@ -212,8 +212,8 @@ def _loadConfig(servers, root, reload):
                     if server_cfg[1] in [XendAPI.AUTH_PAM, XendAPI.AUTH_NONE]:
                         auth_method = server_cfg[1]
 
-                if len(server_cfg) > 2:
-                    hosts_allowed = server_cfg[2] or None
+                if len(server_cfg) > 2 and len(server_cfg[2]):
+                    hosts_allowed = map(re.compile, server_cfg[2].split(' '))
 
                 if len(server_cfg) > 4:
                     # SSL key and cert file

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.