summaryrefslogtreecommitdiff
path: root/keystoneclient/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'keystoneclient/__init__.py')
-rw-r--r--keystoneclient/__init__.py20
1 files changed, 2 insertions, 18 deletions
diff --git a/keystoneclient/__init__.py b/keystoneclient/__init__.py
index 0b4062d..d13c009 100644
--- a/keystoneclient/__init__.py
+++ b/keystoneclient/__init__.py
@@ -13,23 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
-import inspect
-import os
+import pbr.version
-def _get_client_version():
- """Read version from versioninfo file."""
- mod_abspath = inspect.getabsfile(inspect.currentframe())
- client_path = os.path.dirname(mod_abspath)
- version_path = os.path.join(client_path, 'versioninfo')
-
- if os.path.exists(version_path):
- version = open(version_path).read().strip()
- else:
- version = "Unknown, couldn't find versioninfo file at %s"\
- % version_path
-
- return version
-
-
-__version__ = _get_client_version()
+__version__ = pbr.version.VersionInfo('python-keystoneclient').version_string()