summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Node
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2010-05-12 13:28:14 (GMT)
committerSteven Knight <knight@baldmt.com>2010-05-12 13:28:14 (GMT)
commit2d3dac462fc5fb32e8132617a760478de070981e (patch)
treea8a14daa28652e93619e69d5ffe01b2b7a9f0b2b /src/engine/SCons/Node
parent53fc08f1c8d9d4d0174247cb34b770342fd25068 (diff)
downloadSCons-2d3dac462fc5fb32e8132617a760478de070981e.zip
SCons-2d3dac462fc5fb32e8132617a760478de070981e.tar.gz
SCons-2d3dac462fc5fb32e8132617a760478de070981e.tar.bz2
Convert old-style classes to new-style classes.
Leave the Proxy class in Node/FSTests.py, which can't be converted until we convert Node/FS.py itself. Update the AttributeError matches to search for the new "'Foo' object..." error message in addition to the old "'Foo' instance..." message.
Diffstat (limited to 'src/engine/SCons/Node')
-rw-r--r--src/engine/SCons/Node/FSTests.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/engine/SCons/Node/FSTests.py b/src/engine/SCons/Node/FSTests.py
index 38a895b..e013136 100644
--- a/src/engine/SCons/Node/FSTests.py
+++ b/src/engine/SCons/Node/FSTests.py
@@ -44,7 +44,7 @@ built_it = None
scanner_count = 0
-class Scanner:
+class Scanner(object):
def __init__(self, node=None):
global scanner_count
scanner_count = scanner_count + 1
@@ -61,7 +61,7 @@ class Scanner:
def recurse_nodes(self, nodes):
return nodes
-class Environment:
+class Environment(object):
def __init__(self):
self.scanner = Scanner()
def Dictionary(self, *args):
@@ -75,7 +75,7 @@ class Environment:
def _update(self, dict):
pass
-class Action:
+class Action(object):
def __call__(self, targets, sources, env, **kw):
global built_it
if kw.get('execute', 1):
@@ -92,7 +92,7 @@ class Action:
def get_implicit_deps(self, target, source, env):
return []
-class Builder:
+class Builder(object):
def __init__(self, factory, action=Action()):
self.factory = factory
self.env = Environment()
@@ -429,7 +429,7 @@ class VariantDirTestCase(unittest.TestCase):
assert r == d1, "%s != %s" % (r, d1)
# verify the link creation attempts in file_link()
- class LinkSimulator :
+ class LinkSimulator (object):
"""A class to intercept os.[sym]link() calls and track them."""
def __init__( self, duplicate, link, symlink, copy ) :
@@ -1147,7 +1147,7 @@ class FSTestCase(_tempdirTestCase):
# Make sure we can scan this file even if the target isn't
# a file that has a scanner (it might be an Alias, e.g.).
- class DummyNode:
+ class DummyNode(object):
pass
deps = f12.get_found_includes(env, s, DummyNode())
@@ -2081,10 +2081,10 @@ class EntryTestCase(_tempdirTestCase):
assert e4n.__class__ is SCons.Node.FS.File, e4n.__class__
assert not exists, "e4n exists?"
- class MyCalc:
+ class MyCalc(object):
def __init__(self, val):
self.max_drift = 0
- class M:
+ class M(object):
def __init__(self, val):
self.val = val
def collect(self, args):
@@ -2952,8 +2952,8 @@ class stored_infoTestCase(unittest.TestCase):
bi = f.get_stored_info()
assert hasattr(bi, 'ninfo')
- class MySConsign:
- class Null:
+ class MySConsign(object):
+ class Null(object):
def __init__(self):
self.xyzzy = 7
def get_entry(self, name):