diff options
Diffstat (limited to 'src/engine/SCons/SConf.py')
-rw-r--r-- | src/engine/SCons/SConf.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/engine/SCons/SConf.py b/src/engine/SCons/SConf.py index bd67ab2..e8b6c0e 100644 --- a/src/engine/SCons/SConf.py +++ b/src/engine/SCons/SConf.py @@ -33,7 +33,6 @@ import re import StringIO import sys import traceback -import types import SCons.Action import SCons.Builder @@ -154,9 +153,8 @@ def _stringSource( target, source, env ): return (str(target[0]) + ' <-\n |' + source[0].get_contents().replace( '\n', "\n |" ) ) -# python 2.2 introduces types.BooleanType -BooleanTypes = [types.IntType] -if hasattr(types, 'BooleanType'): BooleanTypes.append(types.BooleanType) +# python 2.2 introduces bool +BooleanTypes = [int, bool] class SConfBuildInfo(SCons.Node.FS.FileBuildInfo): """ @@ -790,7 +788,7 @@ class CheckContext: text = "yes" else: text = "no" - elif type(res) == types.StringType: + elif isinstance(res, str): text = res else: raise TypeError, "Expected string, int or bool, got " + str(type(res)) |