Skip to content

Commit

Permalink
make bulidbot.status.github not bail out on missing txgithub
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail Sobolev committed May 19, 2015
1 parent 88c1ce3 commit e825983
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion master/buildbot/status/github.py
Expand Up @@ -18,9 +18,13 @@

from twisted.internet import defer
from twisted.python import log
from txgithub.api import GithubApi as GitHubAPI
try:
from txgithub.api import GithubApi as GitHubAPI
except ImportError:
GitHubAPI = None
from zope.interface import implements

from buildbot import config
from buildbot.interfaces import IStatusReceiver
from buildbot.process.properties import Interpolate
from buildbot.status.base import StatusReceiverMultiService
Expand All @@ -43,6 +47,9 @@ def __init__(self, token, repoOwner, repoName, sha=None,
"""
Token for GitHub API.
"""
if not GitHubAPI:
config.error('GitHubStatus requires txgithub package installed')

StatusReceiverMultiService.__init__(self)

if not sha:
Expand Down

0 comments on commit e825983

Please sign in to comment.