basestring to an internal variable (which we thenuse in a common
is_basestring() utility function), to avoid triggering the basestring fixer.
git-svn-id: http://scons.tigris.org/svn/scons/trunk@4786
fdb21ef1-2011-0410-befe-
b5e4ea1792b1
return self.data.pop(0)
try:
- basestring
+ # exec() the assignment to avoid the basestring fixer.
+ exec('_basestring = basestring')
except NameError:
import types
- def is_basestring(s):
- return isinstance(s, str)
-else:
- def is_basestring(s):
- return isinstance(s, basestring)
+ _basestring = str
+def is_basestring(s):
+ return isinstance(s, _basestring)
# Use the "imp" module to protect the imports below from fixers.
try: