summaryrefslogtreecommitdiff
path: root/gitnoti.py
diff options
context:
space:
mode:
Diffstat (limited to 'gitnoti.py')
-rwxr-xr-xgitnoti.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/gitnoti.py b/gitnoti.py
index 58279c7..854d1e3 100755
--- a/gitnoti.py
+++ b/gitnoti.py
@@ -51,10 +51,16 @@ def check_repos(bot):
bot.gitmsg('Removed repo%s: %s' % ('' if len(del_paths) == 1 else '', ', '.join([os.path.splitext(x)[0] for x in del_paths])))
for i in del_repos:
repos.remove(i)
+ new_added = []
for i in new_paths:
- repos.append([git.Repo('%s/%s' % (root, i)), None])
- if new_paths:
- bot.gitmsg('New repo%s: %s' % ('' if len(new_paths) == 1 else 's', ', '.join([os.path.splitext(x)[0] for x in new_paths])))
+ try:
+ r = git.Repo('%s/%s' % (root, i))
+ repos.append([r, None])
+ new_added.append(i)
+ except:
+ pass
+ if new_added:
+ bot.gitmsg('New repo%s: %s' % ('' if len(new_added) == 1 else 's', ', '.join([os.path.splitext(x)[0] for x in new_added])))
for i, v in enumerate(repos):
repo = v[0]