summaryrefslogtreecommitdiff
path: root/tools/src
diff options
context:
space:
mode:
authorJonathan Robie <jonathan@apache.org>2010-12-10 18:23:06 +0000
committerJonathan Robie <jonathan@apache.org>2010-12-10 18:23:06 +0000
commit3d1c5b9eeb8684e49d1ac7edf1abf827c9084be2 (patch)
treeef1b0b026c3f26c53fbfb72d36ceb6b94136496f /tools/src
parent9fafc90d170166cd87c2a9d7e8c9a79f9717973e (diff)
downloadqpid-python-3d1c5b9eeb8684e49d1ac7edf1abf827c9084be2.tar.gz
Modified qpid-cluster to support the way it is called from
cluster_tests.StoreTests.test_persistent_partial_failure. Corrected test_persistent_partial_failure so that it no longer sends the name of the script as the first parameter - optparse expects this for arguments from sys.argv, but not for other argument lists. Fixed bug assigning host name. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1044468 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'tools/src')
-rwxr-xr-xtools/src/py/qpid-cluster8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/src/py/qpid-cluster b/tools/src/py/qpid-cluster
index aabf460da0..312d59f670 100755
--- a/tools/src/py/qpid-cluster
+++ b/tools/src/py/qpid-cluster
@@ -232,7 +232,7 @@ class BrokerManager:
self.qmf.delBroker(broker)
def main(argv=None):
- if argv is None: argv = sys.argv
+
try:
config = Config()
@@ -247,11 +247,11 @@ def main(argv=None):
parser.add_option("-k", "--all-stop", action="store_true", default=False, help="Shut down the whole cluster")
parser.add_option("-f", "--force", action="store_true", default=False, help="Suppress the 'are you sure' prompt")
parser.add_option("-n", "--numeric", action="store_true", default=False, help="Don't resolve names")
-
- opts, args = parser.parse_args()
+
+ opts, args = parser.parse_args(args=argv)
if args:
- _host = args[0]
+ config._host = args[0]
if opts.timeout != 0:
config._connTimeout = opts.timeout