summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2016-05-04 12:37:53 +0200
committerJan Cholasta <jcholast@redhat.com>2016-05-25 16:06:26 +0200
commit2b50fc617024f18a81e97f30f75ed1b9221c4055 (patch)
tree2ac8b6eb36b11a1d067393c155505f1752ed37f5
parent9e3c16e322ffc65e7d0799bcfbadec5df0ce1ad6 (diff)
downloadfreeipa-2b50fc617024f18a81e97f30f75ed1b9221c4055.tar.gz
freeipa-2b50fc617024f18a81e97f30f75ed1b9221c4055.tar.xz
freeipa-2b50fc617024f18a81e97f30f75ed1b9221c4055.zip
frontend: allow commands to have an argument named `name`
Rename the `name` argument of Command.get_default_of to `_name` to avoid conflicts with keyword arguments. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
-rw-r--r--ipalib/frontend.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/ipalib/frontend.py b/ipalib/frontend.py
index 191520b9b..cfbb3d16f 100644
--- a/ipalib/frontend.py
+++ b/ipalib/frontend.py
@@ -687,12 +687,12 @@ class Command(HasParam):
params = [p.name for p in self.params() if p.name not in kw and (p.required or p.autofill)]
return dict(self.__get_default_iter(params, kw))
- def get_default_of(self, name, **kw):
+ def get_default_of(self, _name, **kw):
"""
- Return default value for parameter `name`.
+ Return default value for parameter `_name`.
"""
- default = dict(self.__get_default_iter([name], kw))
- return default.get(name)
+ default = dict(self.__get_default_iter([_name], kw))
+ return default.get(_name)
def __get_default_iter(self, params, kw):
"""