ia64/xen-unstable

changeset 14701:870133a06f43

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@gandi.net>
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Mon Apr 02 17:34:00 2007 +0100 (2007-04-02)
parents 8cf85d3f4f5f
children 920f762ca42d
files tools/python/xen/xend/server/SrvServer.py
line diff
     1.1 --- a/tools/python/xen/xend/server/SrvServer.py	Mon Apr 02 16:59:00 2007 +0100
     1.2 +++ b/tools/python/xen/xend/server/SrvServer.py	Mon Apr 02 17:34:00 2007 +0100
     1.3 @@ -212,8 +212,8 @@ def _loadConfig(servers, root, reload):
     1.4                      if server_cfg[1] in [XendAPI.AUTH_PAM, XendAPI.AUTH_NONE]:
     1.5                          auth_method = server_cfg[1]
     1.6  
     1.7 -                if len(server_cfg) > 2:
     1.8 -                    hosts_allowed = server_cfg[2] or None
     1.9 +                if len(server_cfg) > 2 and len(server_cfg[2]):
    1.10 +                    hosts_allowed = map(re.compile, server_cfg[2].split(' '))
    1.11  
    1.12                  if len(server_cfg) > 4:
    1.13                      # SSL key and cert file