style: prevent the style hook from aborting uncleanly because of an exception
This commit is contained in:
parent
3c8cc170d2
commit
fcc621ac79
1 changed files with 14 additions and 2 deletions
|
@ -341,12 +341,24 @@ def check_hook(hooktype):
|
|||
def check_style(ui, repo, hooktype, **kwargs):
|
||||
check_hook(hooktype)
|
||||
args = {}
|
||||
|
||||
try:
|
||||
return do_check_style(ui, repo, **args)
|
||||
except Exception, e:
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
return True
|
||||
|
||||
def check_format(ui, repo, hooktype, **kwargs):
|
||||
check_hook(hooktype)
|
||||
args = {}
|
||||
|
||||
try:
|
||||
return do_check_format(ui, repo, **args)
|
||||
except Exception, e:
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
return True
|
||||
|
||||
try:
|
||||
from mercurial.i18n import _
|
||||
|
|
Loading…
Reference in a new issue