From 963bb79a026f0b2f8dc07b954180cee33577caf9 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Tue, 23 Feb 2010 21:28:36 +0100 Subject: Check for empty commit list when printing last commit. --- gitnoti.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitnoti.py b/gitnoti.py index f0aecdb..35105ad 100755 --- a/gitnoti.py +++ b/gitnoti.py @@ -220,7 +220,7 @@ class Bot(irc.IRCClient): if not repo: return - msg = repo_commit_msg(repo, [repo.heads[0].commit]) + msg = repo_commit_msg(repo, [repo.heads[0].commit]) if repo.heads else ('No commits found for %s' % os.path.splitext(os.path.basename(repo.path))[0]) self.msg(target, msg) elif cmd == 'show': if not len(messagelist) == 4: -- cgit v1.2.3