summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2010-02-23 21:28:36 +0100
committerJon Bergli Heier <snakebite@jvnv.net>2010-02-23 21:28:36 +0100
commit963bb79a026f0b2f8dc07b954180cee33577caf9 (patch)
tree5471b163e26f405f100c3167e4c16de6dc52fdc5
parent51c869d1b855b6a1db15946ff96e380dfd86582c (diff)
Check for empty commit list when printing last commit.
-rwxr-xr-xgitnoti.py2
1 files changed, 1 insertions, 1 deletions
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: