autosetup fixes.

This commit is contained in:
Oliver Chang 2016-12-01 13:02:17 -08:00
parent 6a88ec79fb
commit d3eaf61ed8
1 changed files with 5 additions and 3 deletions

View File

@ -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.'