[prtester.py] Fix: Only select actual "option" elements of "select" elements to prevent "TypeError: argument of type 'NoneType' is not iterable" (#3932)

This commit is contained in:
User123698745 2024-01-26 21:45:46 +01:00 committed by GitHub
parent 0e3a79fd78
commit 6938f06125
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

3
.github/prtester.py vendored
View file

@ -87,7 +87,8 @@ def testBridges(instance: Instance, bridge_cards: Iterable, with_upload: bool, w
selectionvalue = ''
listname = listing.get('name')
cleanlist = []
for option in listing.contents:
options = listing.find_all('option')
for option in options:
if 'optgroup' in option.name:
cleanlist.extend(option)
else: