diff options
author | Greg Noel <GregNoel@tigris.org> | 2010-05-20 14:16:08 (GMT) |
---|---|---|
committer | Greg Noel <GregNoel@tigris.org> | 2010-05-20 14:16:08 (GMT) |
commit | 4b3a032823160c0c4560a4644223691ee4f12fc7 (patch) | |
tree | 984d9c7a2c16a1e9a4c32fd9d9b18416db1b5a0f | |
parent | 94752bdb2b08712db2025c479c36b87c5bc8770c (diff) | |
download | SCons-4b3a032823160c0c4560a4644223691ee4f12fc7.zip SCons-4b3a032823160c0c4560a4644223691ee4f12fc7.tar.gz SCons-4b3a032823160c0c4560a4644223691ee4f12fc7.tar.bz2 |
Apply changes caught by fixer plus trivial optimizations
-rw-r--r-- | src/engine/SCons/Util.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/engine/SCons/Util.py b/src/engine/SCons/Util.py index dd47259..738f2b5 100644 --- a/src/engine/SCons/Util.py +++ b/src/engine/SCons/Util.py @@ -33,7 +33,6 @@ import SCons.compat import copy import os -import os.path import re import sys import types @@ -476,7 +475,7 @@ def _semi_deepcopy_inst(x): return x.__class__(_semi_deepcopy_list(x)) else: return x -d[types.InstanceType] = _semi_deepcopy_inst +d[InstanceType] = _semi_deepcopy_inst def semi_deepcopy(x): copier = _semi_deepcopy_dispatch.get(type(x)) @@ -1376,7 +1375,7 @@ def AddMethod(obj, function, name=None): else: function = RenameFunction(function, name) - if hasattr(obj, '__class__') and obj.__class__ != types.TypeType: + if hasattr(obj, '__class__') and obj.__class__ is not type: # "obj" is an instance, so it gets a bound method. setattr(obj, name, types.MethodType(function, obj, obj.__class__)) else: |