mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-10 06:46:15 +01:00
print the error message on multiple description files
This commit is contained in:
parent
f3d7b0e4fc
commit
5d2587e916
@ -3313,11 +3313,16 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
# reduce(lambda x, y: x + y, (glob.glob(x) for x in (g for g in ('*.spec', '*.dsc', '*.kiwi'))))
|
||||
# but be a bit more readable :)
|
||||
descr = glob.glob('*.spec') + glob.glob('*.dsc') + glob.glob('*.kiwi')
|
||||
|
||||
# FIXME:
|
||||
# * request repos from server and select by build type.
|
||||
if not arg_descr and len(descr) == 1:
|
||||
arg_descr = descr[0]
|
||||
elif not arg_descr:
|
||||
|
||||
if not arg_descr:
|
||||
if len(descr) > 1:
|
||||
msg = 'Multiple build description files found: %s' % (", ".join(descr), )
|
||||
else:
|
||||
msg = 'Missing argument: build description (spec, dsc or kiwi file)'
|
||||
try:
|
||||
p = Package('.')
|
||||
@ -3326,6 +3331,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
except:
|
||||
pass
|
||||
raise oscerr.WrongArgs(msg)
|
||||
|
||||
return arg_repository, arg_arch, arg_descr
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user