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>
This commit is contained in:
kfraser@localhost.localdomain committed 2007-04-02 17:34:00 +01:00
1 parent 30afd785f0
commit f884964985
1 file changed
+2 -2
+2 -2
View File
@@ -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
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.