mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-26 22:56:15 +01:00
- do_buildlog: show appropriate error msg if too many args are specified
This commit is contained in:
parent
e2ab1a520e
commit
de884b719c
@ -3365,22 +3365,21 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
|
||||
if len(args) == 1 and args[0].startswith('http'):
|
||||
apiurl, project, package, repository, arch = parse_buildlogurl(args[0])
|
||||
elif len(args) < 2:
|
||||
self.print_repos()
|
||||
elif len(args) > 2:
|
||||
raise oscerr.WrongArgs('Too many arguments.')
|
||||
else:
|
||||
wd = os.curdir
|
||||
package = store_read_package(wd)
|
||||
project = store_read_project(wd)
|
||||
repository = args[0]
|
||||
arch = args[1]
|
||||
|
||||
offset=0
|
||||
if opts.start:
|
||||
offset = int(opts.start)
|
||||
|
||||
if not repository or not arch:
|
||||
if len(args) < 2:
|
||||
self.print_repos()
|
||||
else:
|
||||
repository = args[0]
|
||||
arch = args[1]
|
||||
|
||||
print_buildlog(apiurl, project, package, repository, arch, offset)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user