Changed default behavior to have no finishing sound, and instead of passing in --no-sound to prevent the sound, one would pass in --sound to activate it

This commit is contained in:
Grant Sanderson 2019-01-07 13:24:16 -08:00
parent e957517d7d
commit d98d1ec610
2 changed files with 5 additions and 5 deletions

View file

@ -41,9 +41,9 @@ def parse_cli():
parser.add_argument("-r", "--resolution")
parser.add_argument("-c", "--color")
parser.add_argument(
"--no_sound",
"--sound",
action="store_true",
help="Don't play a success/failure sound",
help="Play a success/failure sound",
)
module_location.add_argument(
"--livestream",
@ -128,7 +128,7 @@ def get_configuration(args):
"output_name": output_name,
"start_at_animation_number": args.start_at_animation_number,
"end_at_animation_number": None,
"no_sound": args.no_sound,
"sound": args.sound,
}
# Camera configuration

View file

@ -136,14 +136,14 @@ def main(config):
for SceneClass in get_scene_classes(scene_names_to_classes, config):
try:
handle_scene(SceneClass(**scene_kwargs), **config)
if not config["no_sound"]:
if config["sound"]:
play_finish_sound()
sys.exit(0)
except Exception:
print("\n\n")
traceback.print_exc()
print("\n\n")
if not config["no_sound"]:
if config["sound"]:
play_error_sound()
sys.exit(2)