From eed6744d08ea4eb02cad1abc8c2a17badeb4c882 Mon Sep 17 00:00:00 2001 From: stevenknight Date: Tue, 9 Sep 2003 03:11:34 +0000 Subject: [PATCH] Don't try to call anydbm.sync() if the underlying db implementation doesn't have one. (Ralf W. Grosse-Kunstleve) git-svn-id: http://scons.tigris.org/svn/scons/trunk@791 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- 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 4d0f6461..d8a6155d 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 298db66c..0245a2c2 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): -- 2.26.2