mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 00:14:35 +03:00
phabstatus: catch TypeErrors thrown from revision lookup code
Summary: In T25434376, we see that this data can in some cases be None, and when we index into None, we get a TypeError: ``` 'NoneType' object has no attribute '__getitem__' ``` I re-arranged the except statements and added TypeError to the second one. I'm not totally happy with this since it's a programming error not actually well dealt with, but this is the quickest fix. Future commits will fix things more thoroughly. Reviewed By: DurhamG Differential Revision: D6826446 fbshipit-source-id: a21abba25817b746cb77a1f652ed15a189fce8fe
This commit is contained in:
parent
0b734e33e7
commit
e194006ddb
@ -78,14 +78,15 @@ def getdiffstatus(repo, *diffid):
|
||||
repodir=os.getcwd(), ca_bundle=ca_certs, repo=repo)
|
||||
statuses = client.getrevisioninfo(timeout, diffid)
|
||||
|
||||
except graphql.ClientError as ex:
|
||||
msg = _('Error talking to phabricator. No diff information can be '
|
||||
except arcconfig.ArcConfigError as ex:
|
||||
msg = _('arcconfig configuration problem. No diff information can be '
|
||||
'provided.\n')
|
||||
hint = _("Error info: %s\n") % str(ex)
|
||||
ret = _fail(repo, diffid, msg, hint)
|
||||
return ret
|
||||
except arcconfig.ArcConfigError as ex:
|
||||
msg = _('arcconfig configuration problem. No diff information can be '
|
||||
|
||||
except (graphql.ClientError, TypeError) as ex:
|
||||
msg = _('Error talking to phabricator. No diff information can be '
|
||||
'provided.\n')
|
||||
hint = _("Error info: %s\n") % str(ex)
|
||||
ret = _fail(repo, diffid, msg, hint)
|
||||
|
Loading…
Reference in New Issue
Block a user