summaryrefslogtreecommitdiff
path: root/qpid/python
diff options
context:
space:
mode:
authorKeith Wall <kwall@apache.org>2015-02-23 11:52:12 +0000
committerKeith Wall <kwall@apache.org>2015-02-23 11:52:12 +0000
commit170decec77cdd1329cbb3f36a496978640a27703 (patch)
treef63124e5a28ed758237b86e4c8c8133d98e62d01 /qpid/python
parentddffcd0a0d65354a93e432800d1695b8299db761 (diff)
downloadqpid-python-170decec77cdd1329cbb3f36a496978640a27703.tar.gz
QPID-6405: [Python Client] Fallback if pkg_resources is not available.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1661647 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python')
-rw-r--r--qpid/python/qpid/util.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/qpid/python/qpid/util.py b/qpid/python/qpid/util.py
index fb343b536a..41c5852d14 100644
--- a/qpid/python/qpid/util.py
+++ b/qpid/python/qpid/util.py
@@ -17,7 +17,7 @@
# under the License.
#
-import os, socket, time, textwrap, re, sys, pkg_resources
+import os, socket, time, textwrap, re, sys
try:
from ssl import wrap_socket as ssl
@@ -51,6 +51,7 @@ def get_client_properties_with_defaults(provided_client_properties={}, version_p
pass
try:
+ import pkg_resources
pkg = pkg_resources.require("qpid-python")
version = pkg[0].version if pkg and pkg[0] and pkg[0].version else version
except: