From 1e1a2c996181cb8b12f6a464e18b1ac5afa4e250 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Wed, 20 Nov 2013 02:47:51 +0100 Subject: [PATCH] python/scripts/aubiocut: make -i optional --- python/scripts/aubiocut | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/python/scripts/aubiocut b/python/scripts/aubiocut index 91215947..a4693109 100755 --- a/python/scripts/aubiocut +++ b/python/scripts/aubiocut @@ -114,8 +114,12 @@ def parse_args(): help="be quiet") (options, args) = parser.parse_args() if not options.source_file: - print "no file name given\n", usage - sys.exit(1) + import os.path + if len(args) == 1: + options.source_file = args[0] + else: + print "no file name given\n", usage + sys.exit(1) return options, args if __name__ == '__main__': -- 2.11.0