summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2011-06-01 19:37:12 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2011-06-01 19:37:12 +0200
commitbcaac23c3c4f066612f9a2e45105acdf6152de0e (patch)
treeb5fa944d5b0497cc668a999f24cca0cd49a25734
parented78c2141087dffc1875d96341254df3454752f6 (diff)
Report invalid repos.
-rwxr-xr-xgitnoti.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/gitnoti.py b/gitnoti.py
index 3f2b757..b6aefcf 100755
--- a/gitnoti.py
+++ b/gitnoti.py
@@ -167,7 +167,11 @@ class ReposNotifyEvent(pyinotify.ProcessEvent):
self.bot.gitmsg('Repo %s was found but couldn''t locate refs/heads/ or refs/tags/ (repo NOT added).' % os.path.splitext(event.name)[0])
return
- repos[event.pathname] = NotifyRepo(self.bot, event.pathname)
+ try:
+ np = NotifyRepo(self.bot, event.pathname)
+ except git.exc.InvalidGitRepositoryError:
+ self.bot.gitmsg('Invalid repo: %s' % os.path.splitext(event.name)[0])
+ repos[event.pathname] = np
self.bot.gitmsg('New repo: %s' % os.path.splitext(event.name)[0])
def process_IN_CREATE(self, event):