From 41b6042b3dfadd0d3053c733ff1aac50bc59e317 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Thu, 17 Jan 2019 20:15:19 +0100 Subject: [PATCH] ignore 404 errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub SokoĊ‚owski --- github/find_repos.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/github/find_repos.py b/github/find_repos.py index 2c08d49..19cebef 100755 --- a/github/find_repos.py +++ b/github/find_repos.py @@ -7,7 +7,10 @@ g = Github(os.environ['GH_TOKEN']) org = g.get_organization('status-im') for repo in org.get_repos(): - contents = repo.get_dir_contents('/') + try: + contents = repo.get_dir_contents('/') + except: + continue # check if repo contains package.json found = [f for f in contents if f.path == 'package.json'] if len(found) > 0: