sudocmd: fix unsupported assignment

sudocmd.get_dn() was trying to assign in an item of a tuple
which is not possible.

https://pagure.io/freeipa/issue/6874

Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Stanislav Laznicka 2017-08-22 14:00:07 +02:00
parent 353d4934af
commit 33f13b6df9

View File

@ -126,7 +126,7 @@ class sudocmd(LDAPObject):
def get_dn(self, *keys, **options):
if keys[-1].endswith('.'):
keys[-1] = keys[-1][:-1]
keys = (keys[:-1] + (keys[-1][:-1], ))
dn = super(sudocmd, self).get_dn(*keys, **options)
try:
self.backend.get_entry(dn, [''])