summaryrefslogtreecommitdiff
path: root/qpid/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
commitf30fc6537007493d0a1e7b9f8bc22743042f47e2 (patch)
tree65f75d58a7a15ae612073087605f362fa97906b6 /qpid/python
parent40fefd9b983fdea452fce6af6b0e222fcc39ea56 (diff)
downloadqpid-python-f30fc6537007493d0a1e7b9f8bc22743042f47e2.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@1159248 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python')
-rw-r--r--qpid/python/qpid/util.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/qpid/python/qpid/util.py b/qpid/python/qpid/util.py
index 41eedf62e8..89677289e2 100644
--- a/qpid/python/qpid/util.py
+++ b/qpid/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