summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorRobert Gemmell <robbie@apache.org>2011-08-18 14:41:41 +0000
committerRobert Gemmell <robbie@apache.org>2011-08-18 14:41:41 +0000
commitb0fbed75c054e3637729bb2250ae6bfc7ede466e (patch)
treeb926ba89a4693096664700a618bc33e6b52974cf /python
parentc1fac4e49d094b4af5d25e32f2fafd5ce0c88d25 (diff)
downloadqpid-python-b0fbed75c054e3637729bb2250ae6bfc7ede466e.tar.gz
QPID-3407: restore python 2.4 compatibility to allow building CPP tree on RHEL 5.3
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1159248 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python')
-rw-r--r--python/qpid/util.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/python/qpid/util.py b/python/qpid/util.py
index 41eedf62e8..89677289e2 100644
--- a/python/qpid/util.py
+++ b/python/qpid/util.py
@@ -151,7 +151,10 @@ class URL:
if self.password:
s += "/%s" % self.password
s += "@"
- s += self.host if ':' not in self.host else "[%s]" % self.host
+ if ':' not in self.host:
+ s += self.host
+ else:
+ s += "[%s]" % self.host
if self.port:
s += ":%s" % self.port
return s