diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2011-06-01 19:37:12 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2011-06-01 19:37:12 +0200 |
commit | bcaac23c3c4f066612f9a2e45105acdf6152de0e (patch) | |
tree | b5fa944d5b0497cc668a999f24cca0cd49a25734 | |
parent | ed78c2141087dffc1875d96341254df3454752f6 (diff) |
Report invalid repos.
-rwxr-xr-x | gitnoti.py | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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): |