Fix TypeError in default_opengles, default_sdl2

Commit 452d58a0b5 switched from passing a list of strings as the
right-hand side of `in` to passing a parenthesized string.  The new form
causes a TypeError if the left hand side is None:

```
>>> None in ('1', '2')
False
>>> None in ('1')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'in <string>' requires string as left operand, not NoneType
```

Add a trailing comma to turn the right hand side back into a list of
strings, as it was before the Raspberry Pi commit.

Fixes: 452d58a0b5 ("Update Raspberry Pi Mesa build for Buster & Pi 4B")
This commit is contained in:
Kp 2019-09-18 02:19:23 +00:00
parent 452d58a0b5
commit b438f0f704

View file

@ -3534,11 +3534,11 @@ class DXXCommon(LazyObjectConstructor):
return self.debug
# automatic setup for raspberrypi
def default_opengles(self):
if self.raspberrypi in ('yes'):
if self.raspberrypi in ('yes',):
return True
return False
def default_sdl2(self):
if self.raspberrypi in ('mesa'):
if self.raspberrypi in ('mesa',):
return True
return False
@classmethod