From f9a59e42e6f04d8bc2446783e6c3223034728345 Mon Sep 17 00:00:00 2001 From: Fabio Costa Date: Sun, 29 Jun 2014 22:25:39 +0100 Subject: [PATCH] Update generate-test-files.py --- scripts/generate-test-files.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/generate-test-files.py b/scripts/generate-test-files.py index eae2459..ca4b0af 100644 --- a/scripts/generate-test-files.py +++ b/scripts/generate-test-files.py @@ -44,13 +44,16 @@ if args[0][len(args[0])-1] != "/": if args[1][len(args[1])-1] != "/": args[1] += "/" -print "coisa : ", args[1] - if len(options.test_seconds) == 0: options.test_seconds = [1,2,3,4,5,6,7,8,9,10] if len(options.audio_formats) == 0: options.audio_formats = ['wav','mp3'] + +try: + os.stat(args[1]) +except: + os.mkdir(args[1]) test_files = [ f for f in listdir(args[0]) if isfile(join(args[0],f)) and os.path.splitext(f)[len(os.path.splitext(f))-1][1:] in options.audio_formats ]