diff options
author | Monty Taylor <mordred@inaugust.com> | 2016-08-26 10:40:11 -0500 |
---|---|---|
committer | Monty Taylor <mordred@inaugust.com> | 2016-08-26 10:45:41 -0500 |
commit | 8d64858523c68b4111e98b14b01f615d79ee4048 (patch) | |
tree | 10206fe2c3828693811bbb585e7976505799546a | |
parent | 24c8f8475b090c36248bd514f1df4496dfe4bb71 (diff) | |
download | pbr-8d64858523c68b4111e98b14b01f615d79ee4048.tar.gz |
Add more words to a confusing error message
When setup.cfg has a different value than pbr.version.VersionInfo(),
then the version call is unable to look up the right value in the
pkg_resources metadata. However, nothing in the current error message
communicates this to the user, which leads to them not being able to
look in all the right places for the possible error.
Change-Id: I31c4e0e2ed15986ba8274a0c5270a9d214ac4b48
-rw-r--r-- | pbr/packaging.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pbr/packaging.py b/pbr/packaging.py index f510740..484cd24 100644 --- a/pbr/packaging.py +++ b/pbr/packaging.py @@ -743,7 +743,11 @@ def get_version(package_name, pre_version=None): return version raise Exception("Versioning for this project requires either an sdist" " tarball, or access to an upstream git repository." - " Are you sure that git is installed?") + " It's also possible that there is a mismatch between" + " the package name in setup.cfg and the argument given" + " to pbr.version.VersionInfo. Project name {name} was" + " given, but was not able to be found.".format( + name=package_name)) # This is added because pbr uses pbr to install itself. That means that |