From dffa7317eb2a1ede76a4df58be253289cc476546 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20H=C3=BCwe?= Date: Thu, 7 May 2009 18:43:04 +0000 Subject: [PATCH] - small fixes (target_package and target_prj were referenced but in some cases there was no assignment before) --- osc/commandline.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/osc/commandline.py b/osc/commandline.py index 90ab0026..b8743bad 100755 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -2857,22 +2857,21 @@ Please submit there instead, or use --nodevelproject to force direct submission. """ apiurl = conf.config['apiurl'] - if args and len(args) >= 3 and len(args) <= 4: + if len(args) >= 3 and len(args) <= 4: prj = args[0] package = target_package = args[1] target_prj = args[2] if len(args) == 4: target_package = args[3] - elif args and len(args) == 2: + elif len(args) == 2: target_prj = prj = args[0] target_package = package = args[1] + elif is_package_dir(os.getcwd()): + apiurl = store_read_apiurl(os.getcwd()) + target_prj = prj = store_read_project(os.getcwd()) + target_package = package = store_read_package(os.getcwd()) else: - if is_package_dir(os.getcwd()): - apiurl = store_read_apiurl(os.getcwd()) - prj = store_read_project(os.getcwd()) - package = store_read_package(os.getcwd()) - else: - raise oscerr.WrongArgs('Please specify project and package') + raise oscerr.WrongArgs('Please specify project and package') # first try stored reference, then lastworking query = { 'rev': 'latest' }