mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-05 02:56:17 +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'):
|
if len(args) == 1 and args[0].startswith('http'):
|
||||||
apiurl, project, package, repository, arch = parse_buildlogurl(args[0])
|
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:
|
else:
|
||||||
wd = os.curdir
|
wd = os.curdir
|
||||||
package = store_read_package(wd)
|
package = store_read_package(wd)
|
||||||
project = store_read_project(wd)
|
project = store_read_project(wd)
|
||||||
|
repository = args[0]
|
||||||
|
arch = args[1]
|
||||||
|
|
||||||
offset=0
|
offset=0
|
||||||
if opts.start:
|
if opts.start:
|
||||||
offset = int(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)
|
print_buildlog(apiurl, project, package, repository, arch, offset)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user