summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Util.py
diff options
context:
space:
mode:
authorGreg Noel <GregNoel@tigris.org>2010-03-29 05:50:15 (GMT)
committerGreg Noel <GregNoel@tigris.org>2010-03-29 05:50:15 (GMT)
commit7adebb06bb6055345cc584377159d8052ea39e1b (patch)
treed0ca5f58b87d964927a1db7f4fe8a602f8405d23 /src/engine/SCons/Util.py
parent59ed0a109bf5add2efcef459080837b11066c6fb (diff)
downloadSCons-7adebb06bb6055345cc584377159d8052ea39e1b.zip
SCons-7adebb06bb6055345cc584377159d8052ea39e1b.tar.gz
SCons-7adebb06bb6055345cc584377159d8052ea39e1b.tar.bz2
http://scons.tigris.org/issues/show_bug.cgi?id=2345
Accumulated small fixers: renames, next, zip, and intern. Files that were modified or added while developing on branches/pending didn't have the fixers previously applied. This patchset picks up those.
Diffstat (limited to 'src/engine/SCons/Util.py')
-rw-r--r--src/engine/SCons/Util.py12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/engine/SCons/Util.py b/src/engine/SCons/Util.py
index f8bac89..8aa5f23 100644
--- a/src/engine/SCons/Util.py
+++ b/src/engine/SCons/Util.py
@@ -1568,22 +1568,14 @@ def MD5collect(signatures):
-# Wrap the intern() function so it doesn't throw exceptions if ineligible
-# arguments are passed. The intern() function was moved into the sys module in
-# Python 3.
-try:
- intern
-except NameError:
- from sys import intern
-
def silent_intern(x):
"""
- Perform intern() on the passed argument and return the result.
+ Perform sys.intern() on the passed argument and return the result.
If the input is ineligible (e.g. a unicode string) the original argument is
returned and no exception is thrown.
"""
try:
- return intern(x)
+ return sys.intern(x)
except TypeError:
return x