From 17f03a7952ff444a36c40dd6aaf5c27ef087d41d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tibor=20Dudl=C3=A1k?= Date: Wed, 28 Jun 2017 17:07:57 +0200 Subject: [PATCH] whoami.py: Type error when running tests While test run the TypeError occured in whoami.validate_output(). There should be 'tuple' type in output too. Fixes: https://pagure.io/freeipa/issue/7050 Reviewed-By: Alexander Bokovoy --- API.txt | 2 +- ipaserver/plugins/whoami.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/API.txt b/API.txt index aabd9c0d4..08ca9198a 100644 --- a/API.txt +++ b/API.txt @@ -6477,7 +6477,7 @@ output: PrimaryKey('value') command: whoami/1 args: 0,1,3 option: Str('version?') -output: Output('arguments', type=[]) +output: Output('arguments', type=[, ]) output: Output('command', type=[]) output: Output('object', type=[]) default: aci/1 diff --git a/ipaserver/plugins/whoami.py b/ipaserver/plugins/whoami.py index 0ec6bb8a7..fa00ebdd4 100644 --- a/ipaserver/plugins/whoami.py +++ b/ipaserver/plugins/whoami.py @@ -87,7 +87,8 @@ class whoami(Command): has_output = ( output.Output('object', unicode, _('Object class name')), output.Output('command', unicode, _('Function to get details')), - output.Output('arguments', list, _('Arguments to details function')), + output.Output('arguments', (list, tuple), + _('Arguments to details function')), ) def execute(self, **options):