Fix git review -d M,N with later gerrit
It seems the "number" field returned via gerrit JSON can be a string (2.13) or a integer (~2.14). Ensure we can handle both. Change-Id: I3cbda6c07343332aba592bd96fd8545f08a2cbfe
This commit is contained in:
parent
b07a524a29
commit
aeeff97487
@ -1209,7 +1209,7 @@ def fetch_review(review, masterbranch, remote, project):
|
||||
refspec = review_info['currentPatchSet']['ref']
|
||||
else:
|
||||
refspec = [ps for ps in review_info['patchSets']
|
||||
if ps['number'] == patchset_number][0]['ref']
|
||||
if str(ps['number']) == patchset_number][0]['ref']
|
||||
except IndexError:
|
||||
raise PatchSetNotFound(review_arg)
|
||||
except KeyError:
|
||||
|
Loading…
Reference in New Issue
Block a user