From 78b764a2cde417c6b00c3e20a1f79441a0123104 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Thu, 27 Sep 2018 14:43:05 -0400 Subject: [PATCH] ignore cleanup patches that are merged Change-Id: Ib0af5b21af70eff23bb9ce0267ca2ecac7e33bd0 Signed-off-by: Doug Hellmann --- goal_tools/python3_first/patches.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/goal_tools/python3_first/patches.py b/goal_tools/python3_first/patches.py index c78d4c2..e20fb66 100644 --- a/goal_tools/python3_first/patches.py +++ b/goal_tools/python3_first/patches.py @@ -218,7 +218,17 @@ class PatchesList(lister.Lister): change['_TEAM'] = team to_add.append(change) if to_add: - rows.extend(get_one_row(c, gov_dat) for c in to_add) + if only_open: + to_add = ( + c + for c in to_add + if c.get('status') not in ('MERGED', 'ABANDONED') + ) + extra_rows = ( + get_one_row(c, gov_dat) + for c in to_add + ) + rows.extend(extra_rows) rows = sorted(rows, key=lambda r: (r[1], r[5], r[4]))