mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 09:17:30 +03:00
lfs: use ProgrammingError for invalid action in _batch
Summary: _batch is called by programmers. If action is not expected, it's a ProgrammingError. Test Plan: arc unit Reviewers: #mercurial, rmcelroy Reviewed By: rmcelroy Subscribers: mjpieters Differential Revision: https://phabricator.intern.facebook.com/D5056822 Signature: t1:5056822:1494634121:59737eb0d3f42d706ee8b0dc18ec7a4b49ada34f
This commit is contained in:
parent
07292913da
commit
34ffa6d4ce
@ -58,8 +58,7 @@ class _gitlfsremote(object):
|
||||
|
||||
def _batch(self, pointers, localstore, action, total=None):
|
||||
if action not in ['upload', 'download']:
|
||||
# FIXME: we should not have that error raise too high
|
||||
raise UnavailableBatchOperationError(None, action)
|
||||
raise error.ProgrammingError('invalid Git-LFS action: %s' % action)
|
||||
|
||||
# Create the batch data for git-lfs.
|
||||
urlreq = util.urlreq
|
||||
|
Loading…
Reference in New Issue
Block a user