Skip to content

Commit

Permalink
Cleanup startup path (surge-synthesizer#718)
Browse files Browse the repository at this point in the history
Show errors when users have incorrect collections of flags
with a help message and a clarifying message
  • Loading branch information
baconpaul committed Mar 4, 2019
1 parent caee303 commit 888f648
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions scripts/wt-tool/wt-tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,26 @@ def main():

act = options.action
if act == "create":
create(options.file, options.wav_dir)
if(options.file is None or options.wav_dir is None):
parser.print_help()
print("\nYou must specify a file and wav_dir for create")
else:
create(options.file, options.wav_dir)
elif act == "explode":
explode(options.file, options.wav_dir)
if(options.file is None or options.wav_dir is None):
parser.print_help()
print("\nYou must specify a file and wav_dir for explode")
else:
explode(options.file, options.wav_dir)
elif act == "info":
info(options.file)
if(options.file is None):
parser.print_help()
print("\nYou must specify a file for info")
else:
info(options.file)
else:
print("Unknown action")
parser.print_help()
print("\nUnknown action '{0}'".format(act))


if __name__ == "__main__":
Expand Down

0 comments on commit 888f648

Please sign in to comment.