1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-09-21 01:36:16 +02:00

Merge pull request #1302 from dmach/fix-buildhistory-limit-type

Fix 'buildhistory' command by setting the type of the '--limit' option to int
This commit is contained in:
Daniel Mach 2023-04-17 16:28:58 +02:00 committed by GitHub
commit c9c3dd62c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 2 deletions

View File

@ -11,6 +11,11 @@ Scenario: Run `osc buildist <project>/<package> <repository>/<arch>`
Then the exit code is 0
Scenario: Run `osc buildist <project>/<package> <repository>/<arch> --limit`
When I execute osc with args "buildhist test:factory/test-pkgA standard/x86_64 --limit=1"
Then the exit code is 0
Scenario: Run `osc buildist <repository>/<arch>` from a package checkout
Given I execute osc with args "co test:factory/test-pkgA"
And I set working directory to "{context.osc.temp}/test:factory/test-pkgA"

View File

@ -20,7 +20,7 @@ class BuildHistory:
self.package = package
self.repository = repository
self.arch = arch
self._limit = limit
self._limit = int(limit)
self.entries = self._get_entries()
def _get_entries(self):

View File

@ -7381,7 +7381,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
@cmdln.option('', '--csv', action='store_true',
help='generate output in CSV (separated by |)')
@cmdln.option('-l', '--limit', metavar='limit',
@cmdln.option('-l', '--limit', metavar='limit', type=int, default=0,
help='for setting the number of results')
@cmdln.option('-M', '--multibuild-package', metavar='FLAVOR',
help=HELP_MULTIBUILD_ONE)