From 51c869d1b855b6a1db15946ff96e380dfd86582c Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Mon, 22 Feb 2010 11:11:00 +0100 Subject: Don't fail on initial adding of empty repos. --- gitnoti.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v1.2.3