diff options
author | Rob Crittenden <rcritten@redhat.com> | 2011-08-19 16:20:01 -0400 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2011-08-19 01:21:22 -0400 |
commit | 92780658b8149b87f1c0cab373b814c09de68975 (patch) | |
tree | a6ee7c6b700f895822d5319db7d82e14e0fb10aa /ipaserver/rpcserver.py | |
parent | b8d4f8ad9fc5e12785ae7eae0f7b773259b7bec1 (diff) | |
download | freeipa-92780658b8149b87f1c0cab373b814c09de68975.tar.gz freeipa-92780658b8149b87f1c0cab373b814c09de68975.tar.xz freeipa-92780658b8149b87f1c0cab373b814c09de68975.zip |
Log each command in a batch separately.
This also fixes command logging in general, it wasn't working in most
cases as a regression in ticket 1322.
https://fedorahosted.org/freeipa/ticket/1598
Diffstat (limited to 'ipaserver/rpcserver.py')
-rw-r--r-- | ipaserver/rpcserver.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ipaserver/rpcserver.py b/ipaserver/rpcserver.py index cf0deed8..39cdbcc7 100644 --- a/ipaserver/rpcserver.py +++ b/ipaserver/rpcserver.py @@ -195,6 +195,9 @@ class WSGIExecutioner(Executioner): error = None _id = None lang = os.environ['LANG'] + name = None + args = () + options = {} if not 'KRB5CCNAME' in environ: return self.marshal(result, CCacheError(), _id) try: @@ -227,12 +230,14 @@ class WSGIExecutioner(Executioner): error = InternalError() finally: os.environ['LANG'] = lang - if error is None: + if name: params = self.Command[name].args_options_2_params(*args, **options) if error: self.info('%s: %s(%s): %s', context.principal, name, ', '.join(self.Command[name]._repr_iter(**params)), e.__class__.__name__) else: self.info('%s: %s(%s): SUCCESS', context.principal, name, ', '.join(self.Command[name]._repr_iter(**params))) + else: + self.info('%s: %s', context.principal, e.__class__.__name__) return self.marshal(result, error, _id) def simple_unmarshal(self, environ): |