Ignore non-directory entries in roles/
The check for whether a README.rst exists would naively look for files like __init__.py/README.rst if there were files in the roles/ directory. Only look for role directories instead. Change-Id: I80268047a08b1294ccef841cd59894ec7133d16d
This commit is contained in:
parent
6106a9051f
commit
8f1cecfd74
3
tests/roles/__init__.py
Normal file
3
tests/roles/__init__.py
Normal file
@ -0,0 +1,3 @@
|
||||
# Stestr discovery in zuul-jobs requires a fully importable filesystem
|
||||
# hierarchy, so simulate that by including a __init__.py file in the
|
||||
# roles dir.
|
@ -180,6 +180,8 @@ class ZuulDirective(Directive):
|
||||
roles = env.domaindata['zuul']['role_paths']
|
||||
for d in role_dirs:
|
||||
for p in os.listdir(d):
|
||||
if not os.path.isdir(os.path.join(d, p)):
|
||||
continue
|
||||
role_readme = os.path.join(d, p, 'README.rst')
|
||||
if os.path.exists(role_readme):
|
||||
roles[p] = role_readme
|
||||
|
Loading…
Reference in New Issue
Block a user