summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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: