mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 08:18:15 +03:00
bundle2: raise ProgrammingError for invalid call of addhookargs()
It should be hard error. Also fixed the error message as s/hooks/hookargs/.
This commit is contained in:
parent
ea20251106
commit
355a92a8ee
@ -318,9 +318,8 @@ class bundleoperation(object):
|
||||
|
||||
def addhookargs(self, hookargs):
|
||||
if self.hookargs is None:
|
||||
raise error.Abort(
|
||||
_('attempted to add hooks to operation after transaction '
|
||||
'started'))
|
||||
raise error.ProgrammingError('attempted to add hookargs to '
|
||||
'operation after transaction started')
|
||||
self.hookargs.update(hookargs)
|
||||
|
||||
class TransactionUnavailable(RuntimeError):
|
||||
|
Loading…
Reference in New Issue
Block a user