From b438f0f704e76c78c61067f4074b4aaac917a7e7 Mon Sep 17 00:00:00 2001 From: Kp Date: Wed, 18 Sep 2019 02:19:23 +0000 Subject: [PATCH] Fix TypeError in `default_opengles`, `default_sdl2` Commit 452d58a0b5fb 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 "", line 1, in TypeError: 'in ' 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: 452d58a0b5fbac0cce8c40c06d19afd15e5d0dcd ("Update Raspberry Pi Mesa build for Buster & Pi 4B") --- SConstruct | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SConstruct b/SConstruct index b8a2a709e..bd8d095e8 100644 --- a/SConstruct +++ b/SConstruct @@ -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