def _verify_hook(self, name): if os.path.exists(self._hook_path(name)): raise GitHookAlreadyExistsError(name)
def verify_hook(self, name): if (self.hooks_dir / name).exists(): raise GitHookAlreadyExistsError(name)