# HG changeset patch # User Charly COSTE # Date 1250507977 -7200 # Node ID a9077fa9cac9807af045d7fda5221e3d307d0f41 # Parent fd695e2b52836881c5ba1aa0b7098f5422400349 Added optional parameter to start_bots_from_xml_config.py Signed-off-by: Charly COSTE diff --git a/start_bots_from_xml_config.py b/start_bots_from_xml_config.py --- a/start_bots_from_xml_config.py +++ b/start_bots_from_xml_config.py @@ -20,14 +20,18 @@ from bot import bot from time import sleep from xml.dom.minidom import parse +import sys bots = [] try: - config = parse('config.xml') + if len(sys.argv) > 1: + config = parse(sys.argv[1]) + else: + config = parse('config.xml') except IOError: - print 'Error: config.xml is missing or cannot be read' + print 'Error: configuration file is missing or cannot be read' quit(1) bots_jids = []