ref: 7af37df141c7342e302f89fdf0442a04f932f0b6
parent: 1f07bdd657ec5113d783d01e5d7a650d8e9412cb
author: Paul Brossier <piem@piem.org>
date: Mon Oct 29 20:50:45 EDT 2018
[demo] fix bpm_extract arguments
--- a/python/demos/demo_bpm_extract.py
+++ b/python/demos/demo_bpm_extract.py
@@ -22,7 +22,7 @@
elif params.mode in ['default']:
pass
else:
- print("unknown mode {:s}".format(params.mode))
+ raise ValueError("unknown mode {:s}".format(params.mode))
# manual settings
if 'samplerate' in params:
samplerate = params.samplerate
@@ -69,9 +69,9 @@
parser = argparse.ArgumentParser()
parser.add_argument('-m', '--mode',
help="mode [default|fast|super-fast]",
- dest="mode")
+ dest="mode", default='default')
parser.add_argument('sources',
- nargs='*',
+ nargs='+',
help="input_files")
args = parser.parse_args()
for f in args.sources: