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:
Thomas Hisch 2017-08-25 22:34:04 +02:00 committed by Ian Wienand
parent b07a524a29
commit aeeff97487
1 changed files with 1 additions and 1 deletions

View File

@ -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: