From 0e8fc5889f72ac60c2cfac9b286c9faa3a6cf658 Mon Sep 17 00:00:00 2001 From: benn Date: Mon, 5 Sep 2022 23:35:38 +0200 Subject: [PATCH] Upgrade: comment-out code not supported in Python3 ListType not supported in types.py in Python3 Why do we require ListType? To do something like if type(item) is ListType: .... But types.py does not have ListType anymore A solution could be if isinstance(item, list): TODO: WIP-remove these comments and fix the code or replace BuilderGCH --- admin/scons/BuilderGCH.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/admin/scons/BuilderGCH.py b/admin/scons/BuilderGCH.py index 3bd226ba6..e115579f1 100644 --- a/admin/scons/BuilderGCH.py +++ b/admin/scons/BuilderGCH.py @@ -16,8 +16,15 @@ # history: 8/2008 adapted for Lumiera build system # changed to accept a list of precompiled header defs - -from types import ListType +# TODO: WIP-remove these comments when port to Python 3.x is DONE +# types.py does not contain ListType in Python 3.x +# # Why do we require ListType? +# To do something like +# if type(item) is ListType: +# .... +# But types.py does not have ListType anymore +# if isinstance(item, list): +#from types import ListType import SCons.Action import SCons.Builder