From 59f5007787b87a37b5e5669a75d39d1d7e88e0e9 Mon Sep 17 00:00:00 2001 From: Uggla Date: Sat, 13 Feb 2016 18:57:28 +0100 Subject: [PATCH] Fix pbr if running without git or sdist --- redfish/__init__.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/redfish/__init__.py b/redfish/__init__.py index f24eeae..ce09d8f 100644 --- a/redfish/__init__.py +++ b/redfish/__init__.py @@ -17,5 +17,10 @@ import pbr.version from redfish.main import * #import redfish.types - -__version__ = pbr.version.VersionInfo('redfish').version_string() +try: + __version__ = pbr.version.VersionInfo('redfish').version_string() +except Exception, e: + if "Versioning for this project requires either an sdist tarball" in e.message: + pass + else: + raise