# HG changeset patch # User RhodeCode Admin # Date 2023-08-28 19:00:41 # Node ID 90d8161dee5328225bba71f40a1801821aa2caa4 # Parent ce7409c640778371052e32bb927eb4311acaaa85 hooks: better error reporting for hooks module errors diff --git a/vcsserver/hooks.py b/vcsserver/hooks.py --- a/vcsserver/hooks.py +++ b/vcsserver/hooks.py @@ -173,7 +173,12 @@ def _get_hooks_client(extras): elif is_shadow_repo: return HooksShadowRepoClient() else: - return HooksDummyClient(extras['hooks_module']) + try: + import_module = extras['hooks_module'] + except KeyError: + log.error('Failed to get "hooks_module" from extras: %s', extras) + raise + return HooksDummyClient(import_module) def _call_hook(hook_name, extras, writer): diff --git a/vcsserver/remote/svn_remote.py b/vcsserver/remote/svn_remote.py --- a/vcsserver/remote/svn_remote.py +++ b/vcsserver/remote/svn_remote.py @@ -186,7 +186,6 @@ class SvnRemote(RemoteBase): # NOTE(marcink): short circuit the check for SVN repo # the repos.open might be expensive to check, but we have one cheap # pre condition that we can use, to check for 'format' file - if not os.path.isfile(os.path.join(path, 'format')): return False