summaryrefslogtreecommitdiff
path: root/python/examples
diff options
context:
space:
mode:
authorJonathan Robie <jonathan@apache.org>2010-08-09 16:34:04 +0000
committerJonathan Robie <jonathan@apache.org>2010-08-09 16:34:04 +0000
commitcf19b99236777026e5f2a00bec6f4e4c10fb631c (patch)
treec6e6e115a277218d914c36e880899e684919b968 /python/examples
parente66cce43ac838b63bc5ef8b7d16cc27fda465506 (diff)
downloadqpid-python-cf19b99236777026e5f2a00bec6f4e4c10fb631c.tar.gz
Changed conditional assignment to vanilla if/then/else, for compatibility with older Python.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@983718 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/examples')
-rwxr-xr-xpython/examples/api/hello11
1 files changed, 9 insertions, 2 deletions
diff --git a/python/examples/api/hello b/python/examples/api/hello
index 4644189941..a220fe794e 100755
--- a/python/examples/api/hello
+++ b/python/examples/api/hello
@@ -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)