phabstatus: remove bad early exit

Summary:
This would cause us to return data outside of our contract, which
crashes in a worse, less useful way that if we catch things ourselves and
print useful debug information.

Reviewed By: quark-zju

Differential Revision: D6826454

fbshipit-source-id: 9cdb2987f762c98c6167ffcea03545bc46eb2119
This commit is contained in:
Ryan McElroy 2018-02-07 01:53:50 -08:00 committed by Saurabh Singh
parent 8cb6affc20
commit 57daa71514
2 changed files with 3 additions and 5 deletions

View File

@ -134,10 +134,6 @@ class Client(object):
except (KeyError, TypeError):
pass
revisions = ret['data']['query'][0]['results']['nodes']
if revisions is None:
return None
infos = {}
for revision in rev_numbers:
info = {}

View File

@ -43,7 +43,9 @@ And now with bad responses:
> [{"data": {"query": [{"results": {"nodes": null}}]}}]
> EOF
$ HG_ARC_CONDUIT_MOCK=$TESTTMP/mockduit hg log -T '{phabstatus}\n' -r . 2>&1 | grep Error
AttributeError: 'NoneType' object has no attribute 'get'
Error talking to phabricator. No diff information can be provided.
Error info: 'NoneType' object is not iterable
Error
$ cat > $TESTTMP/mockduit << EOF
> [{"data": {"query": [{"results": null}]}}]