URL: https://github.com/freeipa/freeipa/pull/812
Title: #812: Refactoring cert-find to use API call directly instead of using

HonzaCholasta commented:
"""
@simo5, it will. Same for hosts.

@felipevolpone, one possible correct fix would be to modify `cert._owners` to:
```python
    def _owners(self):
        for obj_name, pkey_name in [('user', None),
                                    ('host', None),
                                    ('service', 'krbprincipalname')]:
            obj = self.api.Object[obj_name]
            if pkey_name is None:
                pkey = obj.primary_key
            else:
                pkey = obj.params[pkey_name]
            yield obj, pkey
```
and replace all occurences of:
```python
    for owner in (...)._owners():
        ... owner.primary_key ...
```
with:
```python
    for owner, owner_pkey in (...)._owners():
        ... owner_pkey ...
```
"""

See the full comment at 
https://github.com/freeipa/freeipa/pull/812#issuecomment-303936108
_______________________________________________
FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org
To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org

Reply via email to