deleted package.py better error message (#37814)

adds the namespace to the exception object's string representation
This commit is contained in:
simonleary-umass-edu
2023-05-22 12:59:07 -04:00
committed by GitHub
parent d739989ec8
commit ab3f705019

View File

@@ -1239,7 +1239,7 @@ def get_pkg_class(self, pkg_name):
try:
module = importlib.import_module(fullname)
except ImportError:
raise UnknownPackageError(pkg_name)
raise UnknownPackageError(fullname)
except Exception as e:
msg = f"cannot load package '{pkg_name}' from the '{self.namespace}' repository: {e}"
raise RepoError(msg) from e