matrix bridge: Separate print output from sys.exit calls.

This appears to be necessary for acquiring the text for testing.
This commit is contained in:
neiljp (Neil Pilgrim) 2018-06-05 22:06:28 -07:00 committed by Tim Abbott
parent 71b405e95d
commit 8999f0a352

View file

@ -261,7 +261,8 @@ def main():
try: try:
write_sample_config(options.sample_config, options.zuliprc) write_sample_config(options.sample_config, options.zuliprc)
except Bridge_ConfigException as exception: except Bridge_ConfigException as exception:
sys.exit(exception) print("Could not write sample config: {}".format(exception))
sys.exit(1)
if options.zuliprc is None: if options.zuliprc is None:
print("Wrote sample configuration to '{}'".format(options.sample_config)) print("Wrote sample configuration to '{}'".format(options.sample_config))
else: else:
@ -276,7 +277,8 @@ def main():
try: try:
config = read_configuration(options.config) config = read_configuration(options.config)
except Bridge_ConfigException as exception: except Bridge_ConfigException as exception:
sys.exit("Could not parse config file: {}".format(exception)) print("Could not parse config file: {}".format(exception))
sys.exit(1)
# Get config for each client # Get config for each client
zulip_config = config["zulip"] zulip_config = config["zulip"]