[core] Fix prtester for optgroups (#3467)

This commit is contained in:
Bocki 2023-06-30 15:41:00 +02:00 committed by GitHub
parent 410ef85618
commit b6a263037a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 3 deletions

10
.github/prtester.py vendored
View File

@ -52,10 +52,14 @@ def testBridges(bridges,status):
for listing in lists:
selectionvalue = ''
listname = listing.get('name')
if 'optgroup' in listing.contents[0].name:
listing = list(itertools.chain.from_iterable(listing))
cleanlist = []
for option in listing.contents:
if 'optgroup' in option.name:
cleanlist.extend(option)
else:
cleanlist.append(option)
firstselectionentry = 1
for selectionentry in listing:
for selectionentry in cleanlist:
if firstselectionentry:
selectionvalue = selectionentry.get('value')
firstselectionentry = 0