summaryrefslogtreecommitdiff
path: root/glanceclient/__init__.py
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2013-02-04 11:57:45 +1100
committerMonty Taylor <mordred@inaugust.com>2013-02-07 05:10:08 -0600
commitd20d9d1ca42365700c00b4404e1445068e2964d4 (patch)
tree52ee543b403387b0e72855be693c207e029e8645 /glanceclient/__init__.py
parented67c320144c74bd56f64e421ca069c6555771d6 (diff)
downloadpython-glanceclient-d20d9d1ca42365700c00b4404e1445068e2964d4.tar.gz
Update to latest oslo-version.
Remove the need for versioninfo file and just use python's PKG-INFO. Change-Id: I4765141e9bf3fa075dfbbc6a07e495c29e12177b
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')