summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2008-10-10 05:23:00 -0400
committerRob Crittenden <rcritten@redhat.com>2008-10-10 05:23:00 -0400
commit75bad44c27bff471c03ddc86283506f53f47520c (patch)
tree9e29a8a22935c2afee808eb10643ebf70ae24ab6
parent42cdca3e8340c9aae721d582a522b7991ea38050 (diff)
downloadfreeipa-75bad44c27bff471c03ddc86283506f53f47520c.tar.gz
freeipa-75bad44c27bff471c03ddc86283506f53f47520c.tar.xz
freeipa-75bad44c27bff471c03ddc86283506f53f47520c.zip
Enable the verbose flag to pass thru xmlrpc
-rw-r--r--ipalib/plugable.py2
-rw-r--r--ipalib/plugins/b_xmlrpc.py6
-rw-r--r--ipalib/plugins/f_user.py2
3 files changed, 7 insertions, 3 deletions
diff --git a/ipalib/plugable.py b/ipalib/plugable.py
index ffe4a11f1..87f96876d 100644
--- a/ipalib/plugable.py
+++ b/ipalib/plugable.py
@@ -738,6 +738,8 @@ class Environment(object):
continue
self[key] = value
+ def get(self, name, default=None):
+ return self.__map.get(name, default)
class API(DictProxy):
"""
diff --git a/ipalib/plugins/b_xmlrpc.py b/ipalib/plugins/b_xmlrpc.py
index da76aa2bb..618f8385d 100644
--- a/ipalib/plugins/b_xmlrpc.py
+++ b/ipalib/plugins/b_xmlrpc.py
@@ -36,15 +36,15 @@ class xmlrpc(Backend):
Kerberos backend plugin.
"""
- def get_client(self):
+ def get_client(self, verbose=False):
# FIXME: The server uri should come from self.api.env.server_uri
- return xmlrpclib.ServerProxy('http://localhost:8888', allow_none=True)
+ return xmlrpclib.ServerProxy('http://localhost:8888', verbose=verbose)
def forward_call(self, name, *args, **kw):
"""
Forward a call over XML-RPC to an IPA server.
"""
- client = self.get_client()
+ client = self.get_client(verbose=api.env.get('verbose', False))
command = getattr(client, name)
params = xmlrpc_marshal(*args, **kw)
try:
diff --git a/ipalib/plugins/f_user.py b/ipalib/plugins/f_user.py
index 8a1c3045d..9dbc93cba 100644
--- a/ipalib/plugins/f_user.py
+++ b/ipalib/plugins/f_user.py
@@ -231,6 +231,8 @@ class user_find(crud.Find):
return result
def forward(self, *args, **kw):
users = super(crud.Find, self).forward(*args, **kw)
+ if not users:
+ return
counter = users[0]
users = users[1:]
if counter == 0: