summaryrefslogtreecommitdiff
path: root/swiftclient/__init__.py
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-01-21 21:50:21 +0000
committerGerrit Code Review <review@openstack.org>2013-01-21 21:50:21 +0000
commitbf09dd9573f396d703a0df60a5d5e0bc1d280d1f (patch)
tree55373b1cf7363b53264dc8c652be1d779541de3c /swiftclient/__init__.py
parentc19426609696ba1817e50b3caed5f524cdcd0688 (diff)
parent8b80285da695e35133719669fc632aa83a512b6d (diff)
downloadpython-swiftclient-1.3.0.tar.gz
Merge "Update to latest oslo version/setup."1.3.0
Diffstat (limited to 'swiftclient/__init__.py')
-rw-r--r--swiftclient/__init__.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/swiftclient/__init__.py b/swiftclient/__init__.py
index cdeb9ef..d839a91 100644
--- a/swiftclient/__init__.py
+++ b/swiftclient/__init__.py
@@ -3,6 +3,15 @@
OpenStack Swift Python client binding.
"""
from client import *
-from swiftclient import version
-__version__ = version.version_info.deferred_version_string()
+# At setup.py time, we haven't installed anything yet, so there
+# is nothing that is able to set this version property. Squelching
+# that exception here should be fine- if there are problems with
+# pkg_resources in a real install, that will manifest itself as
+# an error still
+try:
+ from swiftclient import version
+
+ __version__ = version.version_info.cached_version_string()
+except Exception:
+ pass