summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2010-02-22 11:11:00 +0100
committerJon Bergli Heier <snakebite@jvnv.net>2010-02-22 11:11:00 +0100
commit51c869d1b855b6a1db15946ff96e380dfd86582c (patch)
treead7d6b713ac13601eda91ee274335e9913937dbd
parent360dbb47fa1cca4ed5cfc4fa3f48255f3d2c5b27 (diff)
Don't fail on initial adding of empty repos.
-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)