zodb-checkins@zope.org
[Top] [All Lists]

[Zodb-checkins] SVN: ZODB/trunk/src/ZODB/DemoStorage.py Do gc if there i

Subject: [Zodb-checkins] SVN: ZODB/trunk/src/ZODB/DemoStorage.py Do gc if there is no base storage.
From: Jim Fulton
Date: Sat, 1 Nov 2008 14:07:30 -0400 EDT
Log message for revision 92739:
  Do gc if there is no base storage.
  

Changed:
  U   ZODB/trunk/src/ZODB/DemoStorage.py

-=-
Modified: ZODB/trunk/src/ZODB/DemoStorage.py
===================================================================
--- ZODB/trunk/src/ZODB/DemoStorage.py  2008-11-01 15:01:48 UTC (rev 92738)
+++ ZODB/trunk/src/ZODB/DemoStorage.py  2008-11-01 18:07:29 UTC (rev 92739)
@@ -194,7 +194,17 @@
             
             return oid
 
-    def pack(self, t, referencesf, gc=False):
+    def pack(self, t, referencesf, gc=None):
+        if gc is None:
+            if self._temporary_base:
+                return self.changes.pack(t, referencesf)
+        elif self._temporary_base:
+            return self.changes.pack(t, referencesf, gc=gc)
+        elif gc:
+            raise TypeError(
+                "Garbage collection isn't supported"
+                " when there is a base storage.")
+        
         try:
             self.changes.pack(t, referencesf, gc=False)
         except TypeError, v:

_______________________________________________
Zodb-checkins mailing list
Zodb-checkins@xxxxxxxx
http://mail.zope.org/mailman/listinfo/zodb-checkins

<Prev in Thread] Current Thread [Next in Thread>
  • [Zodb-checkins] SVN: ZODB/trunk/src/ZODB/DemoStorage.py Do gc if there is no base storage., Jim Fulton <=