Don't try to call anydbm.sync() if the underlying db implementation doesn't have...
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Tue, 9 Sep 2003 03:11:34 +0000 (03:11 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Tue, 9 Sep 2003 03:11:34 +0000 (03:11 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@791 fdb21ef1-2011-0410-befe-b5e4ea1792b1

src/CHANGES.txt
src/engine/SCons/Sig/__init__.py

index 4d0f6461bbc42aec743744266bf088f2f334264b..d8a6155d35a92457ac63cb742e9681b29e75fecc 100644 (file)
@@ -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
index 298db66cac88e11fa91f8d6471f2aa026f62f478..0245a2c2886499d1a4989288445edca2f73d49df 100644 (file)
@@ -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):