Skip to content

Commit

Permalink
skip empty repos
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Oct 31, 2020
1 parent 19c1dd4 commit f9fdc76
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion build.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import requests
from tqdm import tqdm
from github import Github
from github.GithubException import UnknownObjectException
from github.GithubException import GithubException, UnknownObjectException
import yaml
from jinja2 import Template
from funcy import merge
Expand Down Expand Up @@ -139,6 +139,10 @@ def repo2content(repo):
tree = repo.get_git_tree("develop", recursive=False).tree
except UnknownObjectException:
raise exc
except GithubException as exc:
if "is empty" in str(exc):
return {}
raise
files = [i for i in tree if i.path.lower().startswith(".openworm.")]
if not files:
return {}
Expand Down

0 comments on commit f9fdc76

Please sign in to comment.