Small cleanups

This commit is contained in:
Anthony Sottile
2017-09-30 15:15:52 -07:00
parent e717df0ba8
commit 18c9e061d8
17 changed files with 40 additions and 58 deletions

View File

@@ -10,10 +10,13 @@ import six
from pre_commit import five
from pre_commit import output
from pre_commit.errors import FatalError
from pre_commit.store import Store
class FatalError(RuntimeError):
pass
def _to_bytes(exc):
try:
return bytes(exc)
@@ -46,7 +49,5 @@ def error_handler():
_log_and_exit('An error has occurred', e, traceback.format_exc())
except Exception as e:
_log_and_exit(
'An unexpected error has occurred',
e,
traceback.format_exc(),
'An unexpected error has occurred', e, traceback.format_exc(),
)