1
0
Fork 0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-04-01 22:35:21 +03:00

[core] Fix prtester for optgroups ()

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

10
.github/prtester.py vendored
View file

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