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 61726f5..f0aecdb 100755
--- a/gitnoti.py
+++ b/gitnoti.py
@@ -154,7 +154,7 @@ class Bot(irc.IRCClient):
continue
flags = pyinotify.EventsCodes.ALL_FLAGS
wdd = self.wm.add_watch('%s/%s/refs/heads' % (root, path), flags['IN_MODIFY'] | flags['IN_CREATE'])
- repos['%s/%s' % (root, path)] = [r, r.heads[0].commit.id, wdd]
+ repos['%s/%s' % (root, path)] = [r, r.heads[0].commit.id if r.heads else None, wdd]
def gitmsg(self, msg):
self.say(options.channel, msg)