A small fix to catch an issue that can arise when the Python path contains libraries without PKG_INFO, which triggers a ValueError when trying to retrieve the version. For example, I tend to add my git repos to the Python path, but these don't have PKG_INFO, and hence I noticed this problem.
(Incidentally, this seems like a bug in the pkg_resource library too, because trying to retrieve a non-existent version should, if anything, result in an AttributeError, not a ValueError.)
A small fix to catch an issue that can arise when the Python path contains libraries without PKG_INFO, which triggers a
ValueError
when trying to retrieve the version. For example, I tend to add my git repos to the Python path, but these don't have PKG_INFO, and hence I noticed this problem.(Incidentally, this seems like a bug in the
pkg_resource
library too, because trying to retrieve a non-existent version should, if anything, result in anAttributeError
, not aValueError
.)