Update autojob to handle branch regexes

Now that a job branch list can be a list of dictionaries, the autojob
directive can hit this error:

    variant = ', '.join(branches)
  TypeError: sequence item 0: expected str instance, dict found

Handle this by serializing the dictionaries with (str) so that we get
something printable.  It's not going to be pretty, but the old regexes
weren't either.

Change-Id: I9c0b242a8993760a7b7b27bbf231550c03cde183
This commit is contained in:
James E. Blair 2023-09-05 11:03:50 -07:00
parent 9f8accfdad
commit f51dd26d25
1 changed files with 1 additions and 1 deletions

View File

@ -156,7 +156,7 @@ class ZuulDirective(Directive):
branches = job['branches']
if not isinstance(branches, list):
branches = [branches]
variant = ', '.join(branches)
variant = ', '.join([str(x) for x in branches])
lines.append(' :variant: %s' % variant)
lines.append('')
for l in job.get('description', '').split('\n'):