summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2016-06-15 13:44:03 +0200
committerJan Cholasta <jcholast@redhat.com>2016-06-15 14:03:51 +0200
commitd26e42ffb065cc524c63d65d87c2a2b5d943c54a (patch)
tree5b8892f31d979ab28a7ebd116ce16765212073b9
parenta64aba36a42397b02b4032dcd7e7cfa84ae6d30f (diff)
downloadfreeipa-d26e42ffb065cc524c63d65d87c2a2b5d943c54a.tar.gz
freeipa-d26e42ffb065cc524c63d65d87c2a2b5d943c54a.tar.xz
freeipa-d26e42ffb065cc524c63d65d87c2a2b5d943c54a.zip
schema: fix client-side dynamic defaults
Call command_defaults with properly typed arguments. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
-rw-r--r--ipaclient/remote_plugins/schema.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/ipaclient/remote_plugins/schema.py b/ipaclient/remote_plugins/schema.py
index f355f598c..28c3be7a5 100644
--- a/ipaclient/remote_plugins/schema.py
+++ b/ipaclient/remote_plugins/schema.py
@@ -50,8 +50,8 @@ _PARAMS = {
class _SchemaCommand(Command):
def __fix_default_from(self, param):
api = self.api
- name = self.name
- param_name = param.name
+ name = unicode(self.name)
+ param_name = unicode(param.name)
keys = param.default_from.keys
if keys:
@@ -71,7 +71,7 @@ class _SchemaCommand(Command):
)['result']
return result.get(param_name)
- callback.__name__ = '{0}_{1}_default'.format(name, param_name)
+ callback.__name__ = '{0}_{1}_default'.format(self.name, param.name)
return param.clone(default_from=DefaultFrom(callback, *keys))