qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kgiu...@apache.org
Subject svn commit: r1439613 - in /qpid/proton/trunk: proton-c/bindings/python/proton.py tests/proton_tests/common.py
Date Mon, 28 Jan 2013 20:36:40 GMT
Author: kgiusti
Date: Mon Jan 28 20:36:40 2013
New Revision: 1439613

URL: http://svn.apache.org/viewvc?rev=1439613&view=rev
Log:
PROTON-199: compatibility with python 2.4

Modified:
    qpid/proton/trunk/proton-c/bindings/python/proton.py
    qpid/proton/trunk/tests/proton_tests/common.py

Modified: qpid/proton/trunk/proton-c/bindings/python/proton.py
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/bindings/python/proton.py?rev=1439613&r1=1439612&r2=1439613&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/bindings/python/proton.py (original)
+++ qpid/proton/trunk/proton-c/bindings/python/proton.py Mon Jan 28 20:36:40 2013
@@ -32,6 +32,11 @@ The proton APIs consist of the following
 
 from cproton import *
 import uuid
+try:
+  bytes()
+except NameError:
+  bytes = str
+  
 
 LANGUAGE = "C"
 

Modified: qpid/proton/trunk/tests/proton_tests/common.py
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/tests/proton_tests/common.py?rev=1439613&r1=1439612&r2=1439613&view=diff
==============================================================================
--- qpid/proton/trunk/tests/proton_tests/common.py (original)
+++ qpid/proton/trunk/tests/proton_tests/common.py Mon Jan 28 20:36:40 2013
@@ -36,8 +36,12 @@ class TestServer(object):
   def __init__(self, **kwargs):
     self.args = kwargs
     self.driver = Driver()
-    self.host = kwargs["host"] if "host" in kwargs else "127.0.0.1"
-    self.port = kwargs["port"] if "port" in kwargs else 0
+    self.host = "127.0.0.1"
+    self.port = 0
+    if "host" in kwargs:
+      self.host = kwargs["host"]
+    if "port" in kwargs:
+      self.port = kwargs["port"] 
     self.driver_timeout = -1
     self.credit_batch = 10
     self.thread = Thread(name="server-thread", target=self.run)



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message