1
0
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:
Marcus Huewe 2010-07-26 19:02:48 +02:00
parent e2ab1a520e
commit de884b719c

View File

@ -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)