diff options
author | Mats Wichmann <mats@linux.com> | 2020-09-10 18:56:27 (GMT) |
---|---|---|
committer | Mats Wichmann <mats@linux.com> | 2020-11-30 19:26:59 (GMT) |
commit | ffbc4a40573fad1ccd6685d896af930208a769c1 (patch) | |
tree | d6e449f1d2ce6f93770689ba44c115899b157157 /SCons/SConsign.py | |
parent | 64a80e530b0caef9763eb67bd770dd9c8925ea18 (diff) | |
download | SCons-ffbc4a40573fad1ccd6685d896af930208a769c1.zip SCons-ffbc4a40573fad1ccd6685d896af930208a769c1.tar.gz SCons-ffbc4a40573fad1ccd6685d896af930208a769c1.tar.bz2 |
dblite tweaks
use os.replace instead of the dance around os.rename which
behaves differently on Windows.
use True/False for flags for clarity.
Fix some PEP8 warnings.
Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'SCons/SConsign.py')
-rw-r--r-- | SCons/SConsign.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/SCons/SConsign.py b/SCons/SConsign.py index 8e3ebf4..95b8096 100644 --- a/SCons/SConsign.py +++ b/SCons/SConsign.py @@ -35,10 +35,12 @@ from SCons.compat import PICKLE_PROTOCOL def corrupt_dblite_warning(filename): - SCons.Warnings.warn(SCons.Warnings.CorruptSConsignWarning, - "Ignoring corrupt .sconsign file: %s"%filename) + SCons.Warnings.warn( + SCons.Warnings.CorruptSConsignWarning, + "Ignoring corrupt .sconsign file: %s" % filename, + ) -SCons.dblite.ignore_corrupt_dbfiles = 1 +SCons.dblite.IGNORE_CORRUPT_DBFILES = True SCons.dblite.corruption_warning = corrupt_dblite_warning # XXX Get rid of the global array so this becomes re-entrant. @@ -141,7 +143,7 @@ class SConsignEntry: def __getstate__(self): state = getattr(self, '__dict__', {}).copy() for obj in type(self).mro(): - for name in getattr(obj,'__slots__',()): + for name in getattr(obj, '__slots__', ()): if hasattr(self, name): state[name] = getattr(self, name) @@ -154,7 +156,7 @@ class SConsignEntry: def __setstate__(self, state): for key, value in state.items(): - if key not in ('_version_id','__weakref__'): + if key not in ('_version_id', '__weakref__'): setattr(self, key, value) |