spec may be a string, use precomputed namespace (#24867)

This commit is contained in:
Greg Becker
2021-07-14 14:58:31 -04:00
committed by GitHub
parent a9e7f3a4e7
commit 3004f33c58

View File

@@ -662,7 +662,7 @@ def repo_for_pkg(self, spec):
if namespace:
fullspace = get_full_namespace(namespace)
if fullspace not in self.by_namespace:
raise UnknownNamespaceError(spec.namespace)
raise UnknownNamespaceError(namespace)
return self.by_namespace[fullspace]
# If there's no namespace, search in the RepoPath.