diff options
Diffstat (limited to 'gitnoti.py')
-rwxr-xr-x | gitnoti.py | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -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] |