GitHub: Display nice message instead of traceback when callback called without any commit.

master
Valentin Lorentz 2012-04-17 13:14:54 +02:00
parent 922d3efc76
commit e68e621579
1 changed files with 2 additions and 0 deletions

View File

@ -146,6 +146,8 @@ class GitHub(callbacks.Plugin):
if channel not in irc.state.channels:
log.info('Cannot announce commit for repo %s on %s' %
(repo, channel))
elif len(commits) == 0:
log.warning('GitHub callback called without any commit.')
else:
hidden = None
commits = payload['commits']