Fix version issue

This patch fixes a bug that causes pbr to throw an error.

Closes-bug: 1399538
Change-Id: I17ce9e942ab89501b7cc05105791d9f0aca53be8
This commit is contained in:
Aaron Rosen 2014-12-05 00:11:32 -08:00
parent 53dccd7312
commit 1e31e9de10

View File

@ -12,8 +12,12 @@
# License for the specific language governing permissions and limitations
# under the License.
__all__ = ['__version__']
import pbr.version
__version__ = pbr.version.VersionInfo(
'congressclient').version_string()
version_info = pbr.version.VersionInfo('python-congressclient')
try:
__version__ = version_info.version_string()
except AttributeError:
__version__ = None