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
This commit is contained in:
Jeremy Stanley 2013-07-15 14:51:56 +00:00
parent e0207dcc4a
commit d8c51c6830

View File

@ -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'])