[U-Boot] [PATCH] patman: Do not Cc addresses included in To list
Simon Glass
sjg at chromium.org
Fri Aug 17 23:34:09 CEST 2012
Hi Otavio,
On Fri, Aug 17, 2012 at 2:32 PM, Otavio Salvador
<otavio at ossystems.com.br> wrote:
> On Fri, Aug 17, 2012 at 6:30 PM, Simon Glass <sjg at chromium.org> wrote:
>> Hi Otavio,
>>
>> On Wed, Aug 15, 2012 at 12:44 PM, Otavio Salvador
>> <otavio at ossystems.com.br> wrote:
>>> In case an address is listed in the To list, those will be skipped on
>>> Cc list or user might end with a duplicated message.
>>>
>>> This fixes the case when a tag points to same address used as series
>>> destination thus avoiding duplicated sending.
>>>
>>> Signed-off-by: Otavio Salvador <otavio at ossystems.com.br>
>>> ---
>>> tools/patman/series.py | 6 ++++++
>>> 1 file changed, 6 insertions(+)
>>>
>>> diff --git a/tools/patman/series.py b/tools/patman/series.py
>>> index eda1e9b..c338ccb 100644
>>> --- a/tools/patman/series.py
>>> +++ b/tools/patman/series.py
>>> @@ -114,6 +114,12 @@ class Series(dict):
>>> cc_list += gitutil.BuildEmailList(commit.tags)
>>> cc_list += gitutil.BuildEmailList(commit.cc_list)
>>>
>>> + # Remove items on To list
>>> + try:
>>> + map(cc_list.remove, gitutil.BuildEmailList(self.to))
>>> + except ValueError:
>>> + pass
>>> +
>>
>> I'm ok with this as is. But could you do something like:
>>
>> if 'to' in self:
>> map(cc_list.remove, gitutil.BuildEmailList(self.to))
>
> Why? I didn't get why this check would be need.
Only that I think you don't need the exception stuff if you add that
check, so it might be shorter.
Regards,
Simon
>
> I can do that for sure but I'd like to understand.
>
> --
> Otavio Salvador O.S. Systems
> E-mail: otavio at ossystems.com.br http://www.ossystems.com.br
> Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
More information about the U-Boot
mailing list