summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/compat/_scons_UserString.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/SCons/compat/_scons_UserString.py')
-rw-r--r--src/engine/SCons/compat/_scons_UserString.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/engine/SCons/compat/_scons_UserString.py b/src/engine/SCons/compat/_scons_UserString.py
index 785a260..dfc2b30 100644
--- a/src/engine/SCons/compat/_scons_UserString.py
+++ b/src/engine/SCons/compat/_scons_UserString.py
@@ -33,17 +33,13 @@ In particular, it does not necessarily contain all of the methods found
in later versions.
"""
-import types
-
-StringType = types.StringType
-
-if hasattr(types, 'UnicodeType'):
- UnicodeType = types.UnicodeType
+try: unicode
+except NameError:
def is_String(obj):
- return type(obj) in (StringType, UnicodeType)
+ return type(obj) is str
else:
def is_String(obj):
- return type(obj) is StringType
+ return type(obj) in (str, unicode)
class UserString:
def __init__(self, seq):