From d3eaf61ed8d36b2ea1d19d92c22a0ca3c32bc8d6 Mon Sep 17 00:00:00 2001 From: Oliver Chang Date: Thu, 1 Dec 2016 13:02:17 -0800 Subject: [PATCH] autosetup fixes. --- infra/auto-setup/sync.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/infra/auto-setup/sync.py b/infra/auto-setup/sync.py index 9b7510327..b39ca3137 100755 --- a/infra/auto-setup/sync.py +++ b/infra/auto-setup/sync.py @@ -60,13 +60,15 @@ def get_projects(): projects = [] projects_dir = os.path.join(OSSFUZZ_DIR, 'projects') for name in os.listdir(projects_dir): + full_path = os.path.join(projects_dir, name) + if not os.path.isdir(full_path) or not _has_dockerfile(full_path): + continue + if not VALID_PROJECT_NAME.match(name): print >>sys.stderr, 'Invalid project name:', name continue - full_path = os.path.join(projects_dir, name) - if not os.path.isdir(full_path) or not _has_dockerfile(full_path): - continue + projects.append(name) if not projects: print >>sys.stderr, 'No projects found.'