1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-27 15:06:15 +01:00

- small fixes (target_package and target_prj were referenced but in some cases there was no assignment before)

This commit is contained in:
Marcus Hüwe 2009-05-07 18:43:04 +00:00
parent 5684a992dd
commit dffa7317eb

View File

@ -2857,22 +2857,21 @@ Please submit there instead, or use --nodevelproject to force direct submission.
""" """
apiurl = conf.config['apiurl'] 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] prj = args[0]
package = target_package = args[1] package = target_package = args[1]
target_prj = args[2] target_prj = args[2]
if len(args) == 4: if len(args) == 4:
target_package = args[3] target_package = args[3]
elif args and len(args) == 2: elif len(args) == 2:
target_prj = prj = args[0] target_prj = prj = args[0]
target_package = package = args[1] 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: else:
if is_package_dir(os.getcwd()): raise oscerr.WrongArgs('Please specify project and package')
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')
# first try stored reference, then lastworking # first try stored reference, then lastworking
query = { 'rev': 'latest' } query = { 'rev': 'latest' }