You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by jo...@apache.org on 2010/08/09 18:34:05 UTC
svn commit: r983718 - /qpid/trunk/qpid/python/examples/api/hello
Author: jonathan
Date: Mon Aug 9 16:34:04 2010
New Revision: 983718
URL: http://svn.apache.org/viewvc?rev=983718&view=rev
Log:
Changed conditional assignment to vanilla if/then/else, for compatibility with older Python.
Modified:
qpid/trunk/qpid/python/examples/api/hello
Modified: qpid/trunk/qpid/python/examples/api/hello
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/python/examples/api/hello?rev=983718&r1=983717&r2=983718&view=diff
==============================================================================
--- qpid/trunk/qpid/python/examples/api/hello (original)
+++ qpid/trunk/qpid/python/examples/api/hello Mon Aug 9 16:34:04 2010
@@ -21,8 +21,15 @@
import sys
from qpid.messaging import *
-broker = "localhost:5672" if len(sys.argv)<2 else sys.argv[1]
-address = "amq.topic" if len(sys.argv)<3 else sys.argv[2]
+if len(sys.argv)<2:
+ broker = "localhost:5672"
+else:
+ broker = sys.argv[1]
+
+if len(sys.argv)<3:
+ address = "amq.topic"
+else:
+ address = sys.argv[2]
connection = Connection(broker)
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org