diff options
author | Jonathan Robie <jonathan@apache.org> | 2010-08-09 16:34:04 +0000 |
---|---|---|
committer | Jonathan Robie <jonathan@apache.org> | 2010-08-09 16:34:04 +0000 |
commit | 6b41db0155435d9c49fc1f32fac56ea742d849f2 (patch) | |
tree | c6e6e115a277218d914c36e880899e684919b968 /python | |
parent | c38983c3f75ea9213fa786d32ecc94b3c1d232ec (diff) | |
download | qpid-python-6b41db0155435d9c49fc1f32fac56ea742d849f2.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')
-rwxr-xr-x | python/examples/api/hello | 11 |
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) |