From ca3f3041106dbaa8462aeb78c35b640b169d694a Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Mon, 23 Jan 2012 09:50:41 -0500 Subject: Base64-decode unicode values in Bytes parameters. Fix wrong handling of strings in --setattr/--addattr/--delattr. These changes make it possible to use Bytes in --setattr/--addattr/ --delattr without errors. Fixes managing SSH keys on command-line https://fedorahosted.org/freeipa/ticket/754 --- ipalib/cli.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'ipalib/cli.py') diff --git a/ipalib/cli.py b/ipalib/cli.py index 5d07cb1b..169d3e00 100644 --- a/ipalib/cli.py +++ b/ipalib/cli.py @@ -1054,11 +1054,7 @@ class cli(backend.Executioner): Decode param values if appropriate. """ for (key, value) in kw.iteritems(): - param = cmd.params[key] - if isinstance(param, Bytes): - yield (key, value) - else: - yield (key, self.Backend.textui.decode(value)) + yield (key, self.Backend.textui.decode(value)) def build_parser(self, cmd): parser = CLIOptionParser( -- cgit