mirror of
https://github.com/facebook/sapling.git
synced 2025-01-04 03:06:30 +03:00
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:
parent
8cb6affc20
commit
57daa71514
@ -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 = {}
|
||||
|
@ -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}]}}]
|
||||
|
Loading…
Reference in New Issue
Block a user