Merge pull request #153 from coreos-inc/noauthscm

Raise a proper deactivation exception on bad credentials
This commit is contained in:
Jimmy Zelinskie 2015-06-19 13:20:57 -04:00
commit 3036d339b2

View file

@ -637,6 +637,9 @@ class GithubBuildTrigger(BuildTriggerHandler):
except UnknownObjectException:
msg = 'Unable to find GitHub repository for source: %s' % config['build_source']
raise TriggerDeactivationException(msg)
except GitHubBadCredentialsException:
msg = 'Unable to access repository to disable trigger'
raise TriggerDeactivationException(msg)
# If the trigger uses a deploy key, remove it.
try: