gerrit_util: Correctly handle abandon OK response

Recipe-Manual-Change: chrome_release
Bug: 403543870
Change-Id: I5137aa51fa43e696475a654811785c28d0283a08
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6357156
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
This commit is contained in:
Josip Sokcevic
2025-03-14 10:46:37 -07:00
committed by LUCI CQ
parent 5e89ddacb7
commit 04d6a4baa4

View File

@@ -1433,7 +1433,7 @@ def AbandonChange(host, change, msg=''):
path = 'changes/%s/abandon' % change
body = {'message': msg} if msg else {}
conn = CreateHttpConn(host, path, reqtype='POST', body=body)
return ReadHttpJsonResponse(conn, accept_statuses=(204, 409))
return ReadHttpJsonResponse(conn, accept_statuses=(200, 204, 409))
def MoveChange(host, change, destination_branch):