Local variable commits referenced before assignment: fixed

master
ki113d 2012-04-22 13:00:04 +00:00 committed by Valentin Lorentz
parent 48bf53b3d3
commit 373fde9470
1 changed files with 1 additions and 1 deletions

View File

@ -143,6 +143,7 @@ class GitHub(callbacks.Plugin):
for irc in world.ircs:
if channel in irc.state.channels:
break
commits = payload['commits']
if channel not in irc.state.channels:
log.info('Cannot announce commit for repo %s on %s' %
(repo, channel))
@ -150,7 +151,6 @@ class GitHub(callbacks.Plugin):
log.warning('GitHub callback called without any commit.')
else:
hidden = None
commits = payload['commits']
last_commit = commits[-1]
if last_commit['message'].startswith('Merge ') and \
len(commits) > 5: