map re.compile on hosts_allow for XMLRPCServer
PATCH 1/1 map re.compile on hosts_allow for XMLRPCServer
Hi,
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). The attached diff puts re.compile back in.
Signature · 2 lines
\o/ Pascal Bouchareine - Gandi g 0170393757 15, place de la Nation - 75011 Paris
tools/python/xen/xend/server/SrvServer.py +2 -2
@@ -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-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel