From 02d77c4bdaae568c963c3607b115fb8884c84e58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20H=C3=BCwe?= Date: Wed, 15 Aug 2007 19:28:08 +0000 Subject: [PATCH] fixed "osc build" if $BUILD_DIST is set --- osc/commandline.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/osc/commandline.py b/osc/commandline.py index 52869e11..688a138a 100755 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -1341,11 +1341,16 @@ class Osc(cmdln.Cmdln): builddist = os.getenv('BUILD_DIST') if builddist: - #args[3] = args[0] hyphen = builddist.rfind('-') - args.insert(1, builddist[hyphen+1:]) - args.insert(1, builddist[:hyphen]) - print sys.argv + if len(args) == 1: + args = (builddist[:hyphen], builddist[hyphen+1:], args[0]) + elif len(args) == 0: + print >>sys.stderr, 'Missing argument: build description (spec of dsc file)' + return 2 + else: + print >>sys.stderr, 'Too many arguments' + return 2 + # print sys.argv elif len(args) >= 2 and len(args) < 3: print >>sys.stderr, 'Missing argument: build description (spec of dsc file)'