From d8c51c683099c6714056c22a51805d0dfc01466b Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Mon, 15 Jul 2013 14:51:56 +0000 Subject: [PATCH] Treat -2 as a negative approval for expirations. * jeepyb/cmd/expire_old_reviews.py(main): Previously only reviews with a -1 vote were expired, so those with a -2 and no -1 would remain in review indefinitely. This corrects the script to also treat -2 as a negative vote for purposes of auto-expiring a change. Change-Id: Ia447d7b11abafd9b3bb7c7696a7f47ea51bacaa1 --- jeepyb/cmd/expire_old_reviews.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jeepyb/cmd/expire_old_reviews.py b/jeepyb/cmd/expire_old_reviews.py index 9aaad0f..77f9856 100644 --- a/jeepyb/cmd/expire_old_reviews.py +++ b/jeepyb/cmd/expire_old_reviews.py @@ -75,7 +75,7 @@ def main(): if 'rowCount' not in row: # Search for negative approvals for approval in row['currentPatchSet']['approvals']: - if approval['value'] == '-1': + if approval['value'] in ('-1', '-2'): expire_patch_set(ssh, row['currentPatchSet']['revision'], row['subject'])