diff options
author | Lenka Doudova <ldoudova@redhat.com> | 2016-10-06 10:54:07 +0200 |
---|---|---|
committer | Martin Basti <mbasti@redhat.com> | 2016-10-11 15:51:09 +0200 |
commit | c3e3130a35f05348405701731ec2d5b85a772997 (patch) | |
tree | c8b1e112e4306ab0b7c79dd30bb3276c4fe9beb3 | |
parent | 8e02652e7c889ce7d32b592b5235917a0f519503 (diff) | |
download | freeipa-c3e3130a35f05348405701731ec2d5b85a772997.tar.gz freeipa-c3e3130a35f05348405701731ec2d5b85a772997.tar.xz freeipa-c3e3130a35f05348405701731ec2d5b85a772997.zip |
Tests: Fix failing test_ipalib/test_parameters
Parameters test fails because of KeyError caused by improper manipulation with
kwargs in Param.__init__ method. During initialization, if kwargs['required']
or kwargs['multivalue'] is None, it is delete from dictionary and hence the
missing key. Small change of the condition prevents this from happening.
Partially fixes https://fedorahosted.org/freeipa/ticket/6292
Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
-rw-r--r-- | ipalib/parameters.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ipalib/parameters.py b/ipalib/parameters.py index 77a6136cf..32ff9a8df 100644 --- a/ipalib/parameters.py +++ b/ipalib/parameters.py @@ -473,7 +473,7 @@ class Param(ReadOnly): CALLABLE_ERROR % (key, value, type(value)) ) kw[key] = value - else: + elif key not in ('required', 'multivalue'): kw.pop(key, None) # We keep these values to use in __repr__(): |