From: Otavio Salvador Date: Sat, 18 Aug 2012 14:19:51 -0300 Subject: [U-Boot] [PATCH v3] patman: Do not Cc addresses included in To list Message-ID: <1345310391-21286-1-git-send-email-otavio@ossystems.com.br> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- Changes in v2: - use if 'to' in self: to remove the try block Changes in v3: - readd try / except block to handle the valid error tools/patman/series.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/patman/series.py b/tools/patman/series.py index eda1e9b..7829dc7 100644 --- a/tools/patman/series.py +++ b/tools/patman/series.py @@ -114,6 +114,13 @@ class Series(dict): cc_list += gitutil.BuildEmailList(commit.tags) cc_list += gitutil.BuildEmailList(commit.cc_list) + # Skip items in To list + if 'to' in self: + try: + map(cc_list.remove, gitutil.BuildEmailList(self.to)) + except ValueError: + pass + for email in cc_list: if email == None: email = col.Color(col.YELLOW, "" -- 1.7.10.4