diff options
author | Jan Cholasta <jcholast@redhat.com> | 2016-06-30 10:24:57 +0200 |
---|---|---|
committer | Jan Cholasta <jcholast@redhat.com> | 2016-06-30 16:32:20 +0200 |
commit | e4ec4796a38f2143a9df200d55edb990684d67db (patch) | |
tree | 922dcaf78dc9d13a36ae0be4b946b97648c73c07 /ipaclient | |
parent | 0f578ec36ccb3ceb91d64e3967a4fcd01b240895 (diff) | |
download | freeipa-e4ec4796a38f2143a9df200d55edb990684d67db.tar.gz freeipa-e4ec4796a38f2143a9df200d55edb990684d67db.tar.xz freeipa-e4ec4796a38f2143a9df200d55edb990684d67db.zip |
frontend: do not ignore client-side output params
Do not ignore output params defined in client-side overrides.
https://fedorahosted.org/freeipa/ticket/4739
Reviewed-By: David Kupka <dkupka@redhat.com>
Diffstat (limited to 'ipaclient')
-rw-r--r-- | ipaclient/frontend.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/ipaclient/frontend.py b/ipaclient/frontend.py index c2d916d92..a869e337a 100644 --- a/ipaclient/frontend.py +++ b/ipaclient/frontend.py @@ -43,7 +43,10 @@ class CommandOverride(Command): yield option def get_output_params(self): - return self.next.output_params() + for output_param in self.next.output_params(): + yield output_param + for output_param in super(CommandOverride, self).get_output_params(): + yield output_param def _iter_output(self): return self.next.output() @@ -61,3 +64,11 @@ class MethodOverride(CommandOverride, Method): @property def obj(self): return self.next.obj + + def get_output_params(self): + seen = set() + for output_param in super(MethodOverride, self).get_output_params(): + if output_param.name in seen: + continue + seen.add(output_param.name) + yield output_param |