diff options
| author | Greg Noel <GregNoel@tigris.org> | 2010-04-20 21:09:45 (GMT) |
|---|---|---|
| committer | Greg Noel <GregNoel@tigris.org> | 2010-04-20 21:09:45 (GMT) |
| commit | fcd10ca3c39538542594aec5f894fc00fa58bdb1 (patch) | |
| tree | 170c627b8d259510e58f19cd0222e442c8ffb0bc /src | |
| parent | 58a7d5c595a74e266d63fd5e621329ba24d4e75e (diff) | |
| download | SCons-fcd10ca3c39538542594aec5f894fc00fa58bdb1.zip SCons-fcd10ca3c39538542594aec5f894fc00fa58bdb1.tar.gz SCons-fcd10ca3c39538542594aec5f894fc00fa58bdb1.tar.bz2 | |
http://scons.tigris.org/issues/show_bug.cgi?id=2345
One-line changes: Wrap pickle.dump with staticmethod(). Keep softspace in
Unbuffered wrapper class for backward compatibility with 3.x. Use ModuleType
as a factory function rather than a base class. Derive exception class from
something derived from BaseException (required for 3.x).
Diffstat (limited to 'src')
| -rw-r--r-- | src/engine/SCons/Util.py | 2 | ||||
| -rw-r--r-- | src/engine/SCons/dblite.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/engine/SCons/Util.py b/src/engine/SCons/Util.py index 259a133..20be4e4 100644 --- a/src/engine/SCons/Util.py +++ b/src/engine/SCons/Util.py @@ -1406,7 +1406,6 @@ class UniqueList(UserList): self.unique = False - class Unbuffered: """ A proxy class that wraps a file object, flushing after every write, @@ -1414,6 +1413,7 @@ class Unbuffered: """ def __init__(self, file): self.file = file + self.softspace = 0 ## backward compatibility; not supported in Py3k def write(self, arg): try: self.file.write(arg) diff --git a/src/engine/SCons/dblite.py b/src/engine/SCons/dblite.py index 5acd0f2..71aaff3 100644 --- a/src/engine/SCons/dblite.py +++ b/src/engine/SCons/dblite.py @@ -45,7 +45,7 @@ class dblite: # http://mail.python.org/pipermail/python-bugs-list/2003-March/016877.html _open = builtins.open - _pickle_dump = pickle.dump + _pickle_dump = staticmethod(pickle.dump) _os_chmod = os.chmod try: _os_chown = os.chown |
