summaryrefslogtreecommitdiff
path: root/qpid/python/examples/api/hello
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/python/examples/api/hello')
-rwxr-xr-xqpid/python/examples/api/hello16
1 files changed, 10 insertions, 6 deletions
diff --git a/qpid/python/examples/api/hello b/qpid/python/examples/api/hello
index ad314da19e..52ea955093 100755
--- a/qpid/python/examples/api/hello
+++ b/qpid/python/examples/api/hello
@@ -7,9 +7,9 @@
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
-#
+#
# http://www.apache.org/licenses/LICENSE-2.0
-#
+#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -19,15 +19,19 @@
#
import sys
-from qpid.messaging import *
+
+try:
+ from qpid_messaging import *
+except:
+ from qpid.messaging import *
if len(sys.argv)<2:
- broker = "localhost:5672"
+ broker = "localhost:5672"
else:
broker = sys.argv[1]
-if len(sys.argv)<3:
- address = "amq.topic"
+if len(sys.argv)<3:
+ address = "amq.topic"
else:
address = sys.argv[2]