Make max iterations a flag.

This commit is contained in:
Jelmer Vernooij 2021-03-30 19:17:41 +01:00
parent 4d052ebb44
commit 7629a1932e

View file

@ -607,6 +607,11 @@ def main(argv=None):
dest="update_changelog",
help="do not update the changelog",
)
parser.add_argument(
'--max-iterations',
type=int,
default=DEFAULT_MAX_ITERATIONS,
help='Maximum number of issues to attempt to fix before giving up.')
parser.add_argument(
"--update-changelog",
action="store_true",
@ -660,6 +665,7 @@ def main(argv=None):
None,
committer=args.committer,
update_changelog=args.update_changelog,
max_iterations=args.max_iterations,
)
except SbuildFailure as e:
if e.phase is None:
@ -676,7 +682,7 @@ def main(argv=None):
logging.info(
'Built %s - changes file at %r.',
os.path.join(output_directory, changes_files))
os.path.join(output_directory, changes_filenames))
if __name__ == "__main__":