summaryrefslogtreecommitdiff
path: root/swiftclient/__init__.py
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2013-01-10 08:24:47 +0000
committerMonty Taylor <mordred@inaugust.com>2013-01-14 03:29:22 -0800
commit8b80285da695e35133719669fc632aa83a512b6d (patch)
treea6f613a3296fc02dab421f42da6f66198b1aa361 /swiftclient/__init__.py
parentf65f96bc59599a855f9f2b2cdfa503a8cdb1f758 (diff)
downloadpython-swiftclient-8b80285da695e35133719669fc632aa83a512b6d.tar.gz
Update to latest oslo version/setup.
Change-Id: I7bd38b950ef9fea8b6eaa1df599085a1c64d8b61
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