summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/compat
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/SCons/compat')
-rw-r--r--src/engine/SCons/compat/_scons_builtins.py32
-rw-r--r--src/engine/SCons/compat/_scons_subprocess.py7
2 files changed, 16 insertions, 23 deletions
diff --git a/src/engine/SCons/compat/_scons_builtins.py b/src/engine/SCons/compat/_scons_builtins.py
index 012d6c2..59be7af 100644
--- a/src/engine/SCons/compat/_scons_builtins.py
+++ b/src/engine/SCons/compat/_scons_builtins.py
@@ -62,6 +62,22 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import builtins
try:
+ False
+except NameError:
+ # Pre-2.2 Python has no False keyword.
+ exec('builtins.False = not 1')
+ # Assign to False in this module namespace so it shows up in pydoc output.
+ #False = False
+
+try:
+ True
+except NameError:
+ # Pre-2.2 Python has no True keyword.
+ exec('builtins.True = not 0')
+ # Assign to True in this module namespace so it shows up in pydoc output.
+ #True = True
+
+try:
all
except NameError:
# Pre-2.5 Python has no all() function.
@@ -122,22 +138,6 @@ except NameError:
builtins.dict = dict
try:
- False
-except NameError:
- # Pre-2.2 Python has no False keyword.
- builtins.False = not 1
- # Assign to False in this module namespace so it shows up in pydoc output.
- #False = False
-
-try:
- True
-except NameError:
- # Pre-2.2 Python has no True keyword.
- builtins.True = not 0
- # Assign to True in this module namespace so it shows up in pydoc output.
- #True = True
-
-try:
file
except NameError:
# Pre-2.2 Python has no file() function.
diff --git a/src/engine/SCons/compat/_scons_subprocess.py b/src/engine/SCons/compat/_scons_subprocess.py
index bdcae63..97eb498 100644
--- a/src/engine/SCons/compat/_scons_subprocess.py
+++ b/src/engine/SCons/compat/_scons_subprocess.py
@@ -433,13 +433,6 @@ except KeyboardInterrupt:
except:
MAXFD = 256
-# True/False does not exist on 2.2.0
-try:
- False
-except NameError:
- False = 0
- True = 1
-
try:
isinstance(1, int)
except TypeError: