diff options
| author | Steven Knight <knight@baldmt.com> | 2004-06-01 04:41:58 (GMT) |
|---|---|---|
| committer | Steven Knight <knight@baldmt.com> | 2004-06-01 04:41:58 (GMT) |
| commit | c642fca37d45da3f01c892b1518ce42ef8abbb6e (patch) | |
| tree | 6483b18f10e11a46357d385fae5d023c25ce58b8 /src/engine/SCons/Node | |
| parent | 78b110985d41c80a1803e95f3f9fe7280a0c1cb1 (diff) | |
| download | SCons-c642fca37d45da3f01c892b1518ce42ef8abbb6e.zip SCons-c642fca37d45da3f01c892b1518ce42ef8abbb6e.tar.gz SCons-c642fca37d45da3f01c892b1518ce42ef8abbb6e.tar.bz2 | |
Remove dead imports and other things found by PyChecker.
Diffstat (limited to 'src/engine/SCons/Node')
| -rw-r--r-- | src/engine/SCons/Node/FS.py | 12 | ||||
| -rw-r--r-- | src/engine/SCons/Node/Python.py | 12 | ||||
| -rw-r--r-- | src/engine/SCons/Node/__init__.py | 15 |
3 files changed, 20 insertions, 19 deletions
diff --git a/src/engine/SCons/Node/FS.py b/src/engine/SCons/Node/FS.py index 13a2f52..1863d93 100644 --- a/src/engine/SCons/Node/FS.py +++ b/src/engine/SCons/Node/FS.py @@ -1243,7 +1243,7 @@ class Dir(Base): """A null "builder" for directories.""" return [] - def build(self): + def build(self, **kw): """A null "builder" for directories.""" pass @@ -1673,12 +1673,12 @@ class File(Base): if calc.max_drift >= 0 and (time.time() - mtime) > calc.max_drift: try: - self.binfo + binfo = self.binfo except AttributeError: - self.binfo = self.new_binfo() - self.binfo.csig = csig - self.binfo.timestamp = mtime - self.store_info(self.binfo) + binfo = self.binfo = self.new_binfo() + binfo.csig = csig + binfo.timestamp = mtime + self.store_info(binfo) return csig diff --git a/src/engine/SCons/Node/Python.py b/src/engine/SCons/Node/Python.py index a2537ae..e15888b 100644 --- a/src/engine/SCons/Node/Python.py +++ b/src/engine/SCons/Node/Python.py @@ -67,12 +67,12 @@ class Value(SCons.Node.Node): timestamp, we get to ignore the calculator and just use the value contents.""" try: - self.binfo + binfo = self.binfo except: - self.binfo = self.new_binfo() + binfo = self.binfo = self.new_binfo() try: - return self.binfo.csig + return binfo.csig except AttributeError: - self.binfo.csig = self.get_contents() - self.store_info(self.binfo) - return self.binfo.csig + binfo.csig = self.get_contents() + self.store_info(binfo) + return binfo.csig diff --git a/src/engine/SCons/Node/__init__.py b/src/engine/SCons/Node/__init__.py index 66e1420..24c70b8 100644 --- a/src/engine/SCons/Node/__init__.py +++ b/src/engine/SCons/Node/__init__.py @@ -549,15 +549,15 @@ class Node: def calc_csig(self, calc): try: - self.binfo - except: - self.binfo = self.new_binfo() + binfo = self.binfo + except AttributeError: + binfo = self.binfo = self.new_binfo() try: - return self.binfo.csig + return binfo.csig except AttributeError: - self.binfo.csig = calc.module.signature(self) - self.store_info(self.binfo) - return self.binfo.csig + binfo.csig = calc.module.signature(self) + self.store_info(binfo) + return binfo.csig def store_info(self, obj): """Make the build signature permanent (that is, store it in the @@ -930,6 +930,7 @@ class Walker: parent = None self.eval_func(node, parent) return node + return None def is_done(self): return not self.stack |
