mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Better project structure
This commit is contained in:
parent
f31f092f9b
commit
1746a97e24
52 changed files with 221 additions and 189 deletions
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
from __future__ import print_function
|
||||
|
||||
import os
|
||||
|
|
@ -42,7 +41,8 @@ def uninstall(runner):
|
|||
return 0
|
||||
|
||||
|
||||
class RepositoryCannotBeUpdatedError(RuntimeError): pass
|
||||
class RepositoryCannotBeUpdatedError(RuntimeError):
|
||||
pass
|
||||
|
||||
|
||||
def _update_repository(repo_config):
|
||||
|
|
@ -95,8 +95,8 @@ def autoupdate(runner):
|
|||
print('Updating {0}...'.format(repo_config['repo']), end='')
|
||||
try:
|
||||
new_repo_config = _update_repository(repo_config)
|
||||
except RepositoryCannotBeUpdatedError as e:
|
||||
print(e.args[0])
|
||||
except RepositoryCannotBeUpdatedError as error:
|
||||
print(error.args[0])
|
||||
output_configs.append(repo_config)
|
||||
retv = 1
|
||||
continue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue