summaryrefslogtreecommitdiff
path: root/glanceclient/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'glanceclient/__init__.py')
-rw-r--r--glanceclient/__init__.py21
1 files changed, 2 insertions, 19 deletions
diff --git a/glanceclient/__init__.py b/glanceclient/__init__.py
index 3d49db7..06cc73d 100644
--- a/glanceclient/__init__.py
+++ b/glanceclient/__init__.py
@@ -23,23 +23,6 @@ except ImportError:
import warnings
warnings.warn("Could not import glanceclient.client", ImportWarning)
-import os
-import inspect
+from glanceclient.openstack.common import version as common_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__ = common_version.VersionInfo('python-glanceclient')