You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ro...@apache.org on 2011/08/18 16:41:41 UTC

svn commit: r1159248 - /qpid/trunk/qpid/python/qpid/util.py

Author: robbie
Date: Thu Aug 18 14:41:41 2011
New Revision: 1159248

URL: http://svn.apache.org/viewvc?rev=1159248&view=rev
Log:
QPID-3407: restore python 2.4 compatibility to allow building CPP tree on RHEL 5.3

Modified:
    qpid/trunk/qpid/python/qpid/util.py

Modified: qpid/trunk/qpid/python/qpid/util.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/util.py?rev=1159248&r1=1159247&r2=1159248&view=diff
==============================================================================
--- qpid/trunk/qpid/python/qpid/util.py (original)
+++ qpid/trunk/qpid/python/qpid/util.py Thu Aug 18 14:41:41 2011
@@ -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



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Re: Fwd: svn commit: r1159248 - /qpid/trunk/qpid/python/qpid/util.py

Posted by Andrew Stitcher <as...@redhat.com>.
On Thu, 2011-08-18 at 15:56 +0100, Robbie Gemmell wrote:
> I updated this bit of python code to allow me to complete the C++
> broker build on my RHEL 5.3 box. It seems to just be a case of using
> syntactic sugar not present in python 2.4 so I dont think there should
> be issue with the change, but I thought I'd point it out anyway since
> its not really my area...

That change is fine.

Andrew



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Fwd: svn commit: r1159248 - /qpid/trunk/qpid/python/qpid/util.py

Posted by Robbie Gemmell <ro...@apache.org>.
I updated this bit of python code to allow me to complete the C++
broker build on my RHEL 5.3 box. It seems to just be a case of using
syntactic sugar not present in python 2.4 so I dont think there should
be issue with the change, but I thought I'd point it out anyway since
its not really my area...

Robbie

---------- Forwarded message ----------
From:  <ro...@apache.org>
Date: 18 August 2011 15:41
Subject: svn commit: r1159248 - /qpid/trunk/qpid/python/qpid/util.py
To: commits@qpid.apache.org


Author: robbie
Date: Thu Aug 18 14:41:41 2011
New Revision: 1159248

URL: http://svn.apache.org/viewvc?rev=1159248&view=rev
Log:
QPID-3407: restore python 2.4 compatibility to allow building CPP tree
on RHEL 5.3

Modified:
   qpid/trunk/qpid/python/qpid/util.py

Modified: qpid/trunk/qpid/python/qpid/util.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/util.py?rev=1159248&r1=1159247&r2=1159248&view=diff
==============================================================================
--- qpid/trunk/qpid/python/qpid/util.py (original)
+++ qpid/trunk/qpid/python/qpid/util.py Thu Aug 18 14:41:41 2011
@@ -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



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org