diff --git a/buildtrigger/githubhandler.py b/buildtrigger/githubhandler.py index 2423cbc07..12bb3dc7f 100644 --- a/buildtrigger/githubhandler.py +++ b/buildtrigger/githubhandler.py @@ -206,7 +206,7 @@ class GithubBuildTrigger(BuildTriggerHandler): hook = gh_repo.create_hook('web', webhook_config) config['hook_id'] = hook.id config['master_branch'] = gh_repo.default_branch - except GithubException: + except GithubException as ghe: default_msg = 'Unable to create webhook on repository: %s' % new_build_source msg = GithubBuildTrigger._get_error_message(ghe, default_msg) raise TriggerActivationException(msg)