[Freeipa-devel] [PATCH 0066] ipactl: Do not start/stop/restart single service multiple times

Tomas Babej tbabej at redhat.com
Tue Oct 13 12:01:28 UTC 2015



On 08/27/2015 08:07 AM, David Kupka wrote:
> On 26/08/15 17:49, Tomas Babej wrote:
>>
>>
>> On 08/26/2015 03:16 PM, David Kupka wrote:
>>> https://fedorahosted.org/freeipa/ticket/5248
>>>
>>>
>>
>> +def deduplicate(lst):
>> +    new_lst = []
>> +    s = set(lst)
>> +    for i in lst:
>> +        if i in s:
>> +            s.remove(i)
>> +            new_lst.append(i)
>> +
>> +    return new_lst
>> +
>>
>> Imho, this method deserves a docstring or at least a comment. It is not
>> entrirely clear from the name, that its job is to remove the duplicates
>> while preserving the order of the entries.
>>
> 
> You're right, line or two could not hurt. Patch attached.

Obvious ACK from me.

Pushed to:
master: 5ff4170ff9cab64d3527001de8214cb30439e3e3
ipa-4-2: 9e3d0d6f591496a2370a14832f7c0c399a16b2ea




More information about the Freeipa-devel mailing list