From e10b74a59f1830769ba4c7e65a846228812ae2fa Mon Sep 17 00:00:00 2001 From: Steven Knight Date: Tue, 9 Sep 2003 03:11:34 +0000 Subject: Don't try to call anydbm.sync() if the underlying db implementation doesn't have one. (Ralf W. Grosse-Kunstleve) --- src/CHANGES.txt | 4 ++++ src/engine/SCons/Sig/__init__.py | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 4d0f646..d8a6155 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -20,6 +20,10 @@ RELEASE X.XX - XXX - Add support for CCVERSION and CXXVERSION variables for a number of C and C++ compilers. + From Ralf W. Grosse-Kunstleve: + + - Accomodate anydbm modules that don't have a sync() method. + From Stephen Kennedy: - Add support for a configurable global .sconsign.dbm file which diff --git a/src/engine/SCons/Sig/__init__.py b/src/engine/SCons/Sig/__init__.py index 298db66..0245a2c 100644 --- a/src/engine/SCons/Sig/__init__.py +++ b/src/engine/SCons/Sig/__init__.py @@ -213,7 +213,11 @@ class SConsignDB(_SConsign): if self.dirty: global SConsign_db SConsign_db[self.dir.path] = cPickle.dumps(self.entries, 1) - SConsign_db.sync() + try: + SConsign_db.sync() + except AttributeError: + # Not all anydbm modules have sync() methods. + pass class SConsignDir(_SConsign): def __init__(self, fp=None, module=None): -- cgit v0.12