From eae808020cac3093f44c126cdde4b36c59fe791c Mon Sep 17 00:00:00 2001 From: wes Date: Tue, 16 May 2017 17:45:44 -0400 Subject: [PATCH] argument checking --- slice.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/slice.py b/slice.py index 3f0152d..2fc8bab 100755 --- a/slice.py +++ b/slice.py @@ -6,7 +6,7 @@ from random import shuffle from sys import argv from fabric.api import * -THRESHOLD = 1.0 +THRESHOLD = 0.8 SIZE_LIMIT = 10 def rms(ss): @@ -47,6 +47,10 @@ def silence(infile): convert(infile) def silence_all(): + if len(argv) < 2: + print "You must pass a directory as the first argument" + return + with lcd(argv[1]): local("mkdir -p ./shortened") fileset = local("ls .", capture=True).split("\n")