From: Pascal Bouchareine Subject: [PATCH] map re.compile on hosts_allow for XMLRPCServer Date: Mon, 2 Apr 2007 15:51:25 +0200 Message-ID: <20070402135125.GA72104@bar.gandi.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="SUOF0GtieIMvvwua" Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --SUOF0GtieIMvvwua Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. -- \o/ Pascal Bouchareine - Gandi g 0170393757 15, place de la Nation - 75011 Paris --SUOF0GtieIMvvwua Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="srvserver-hosts_allow_recompile.diff" diff -r 8f9ca49175ce tools/python/xen/xend/server/SrvServer.py --- a/tools/python/xen/xend/server/SrvServer.py Sat Mar 31 19:02:09 2007 +0100 +++ b/tools/python/xen/xend/server/SrvServer.py Mon Apr 2 15:35:57 2007 +0200 @@ -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 --SUOF0GtieIMvvwua Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --SUOF0GtieIMvvwua--