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
commitb18693dde785bfc0b566b6c8adf50ec1004a8135 (patch)
treeb926ba89a4693096664700a618bc33e6b52974cf /python
parentd13e097511b7755ddeedf940c799402fd861772f (diff)
downloadqpid-python-b18693dde785bfc0b566b6c8adf50ec1004a8135.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