summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Script
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2010-05-16 14:44:28 (GMT)
committerSteven Knight <knight@baldmt.com>2010-05-16 14:44:28 (GMT)
commit31d33033b32826914dd32fde0e52a7edf8d8720b (patch)
tree65feb1bbbea01ea43a382c2f11d2672ed7fe105b /src/engine/SCons/Script
parentdd1b7116ad4be5ef6ff8cf76ed227ad36003654b (diff)
downloadSCons-31d33033b32826914dd32fde0e52a7edf8d8720b.zip
SCons-31d33033b32826914dd32fde0e52a7edf8d8720b.tar.gz
SCons-31d33033b32826914dd32fde0e52a7edf8d8720b.tar.bz2
Commit old-style classes in Node/__init__.py to new-style classes.
Fix a ripple-effect in Script/Main.py by using obj.__class__.__name_ to, uh, fetch the name of a class.
Diffstat (limited to 'src/engine/SCons/Script')
-rw-r--r--src/engine/SCons/Script/Main.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/engine/SCons/Script/Main.py b/src/engine/SCons/Script/Main.py
index a1df683..d5057e1 100644
--- a/src/engine/SCons/Script/Main.py
+++ b/src/engine/SCons/Script/Main.py
@@ -207,12 +207,10 @@ class BuildTask(SCons.Taskmaster.OutOfDateTask):
t = self.targets[0]
if self.top and not t.has_builder() and not t.side_effect:
if not t.exists():
- def classname(obj):
- return str(obj.__class__).split('.')[-1]
- if classname(t) in ('File', 'Dir', 'Entry'):
- errstr="Do not know how to make %s target `%s' (%s)." % (classname(t), t, t.abspath)
+ if t.__class__.__name__ in ('File', 'Dir', 'Entry'):
+ errstr="Do not know how to make %s target `%s' (%s)." % (t.__class__.__name__, t, t.abspath)
else: # Alias or Python or ...
- errstr="Do not know how to make %s target `%s'." % (classname(t), t)
+ errstr="Do not know how to make %s target `%s'." % (t.__class__.__name__, t)
sys.stderr.write("scons: *** " + errstr)
if not self.options.keep_going:
sys.stderr.write(" Stop.")