configloader: check for unknown shadow projects
This change raise an exception when a shadow project is not found.
Change-Id: I7c886907dde7b64346304c88250e6c1f1aacef03
diff --git a/zuul/configloader.py b/zuul/configloader.py
index d3f3236..7a0b12e 100644
--- a/zuul/configloader.py
+++ b/zuul/configloader.py
@@ -1300,7 +1300,10 @@
def _resolveShadowProjects(self, tenant, tpc):
shadow_projects = []
for sp in tpc.shadow_projects:
- shadow_projects.append(tenant.getProject(sp)[1])
+ _, project = tenant.getProject(sp)
+ if project is None:
+ raise ProjectNotFoundError(sp)
+ shadow_projects.append(project)
tpc.shadow_projects = frozenset(shadow_projects)
def _getProjectBranches(self, tenant, tpc, old_tenant):