[Zodb-checkins] SVN: ZODB/branches/jim-zeo-blob/src/ZODB/Blobs/BlobStorage.py Don't error if no blob file. Blobs are allowed to not have blob

Jim Fulton jim at zope.com
Tue May 15 18:28:45 EDT 2007


Log message for revision 75782:
  Don't error if no blob file.  Blobs are allowed to not have blob
  files, for better or worse.
  

Changed:
  U   ZODB/branches/jim-zeo-blob/src/ZODB/Blobs/BlobStorage.py

-=-
Modified: ZODB/branches/jim-zeo-blob/src/ZODB/Blobs/BlobStorage.py
===================================================================
--- ZODB/branches/jim-zeo-blob/src/ZODB/Blobs/BlobStorage.py	2007-05-15 22:02:14 UTC (rev 75781)
+++ ZODB/branches/jim-zeo-blob/src/ZODB/Blobs/BlobStorage.py	2007-05-15 22:28:44 UTC (rev 75782)
@@ -62,6 +62,11 @@
         self.__supportsUndo = supportsUndo
 
     @non_overridable
+    def temporaryDirectory(self):
+        return self.fshelper.base_dir
+
+
+    @non_overridable
     def __repr__(self):
         normal_storage = getProxiedObject(self)
         return '<BlobStorage proxy for %r at %s>' % (normal_storage,
@@ -116,11 +121,10 @@
     @non_overridable
     def loadBlob(self, oid, serial, version):
         """Return the filename where the blob file can be found.
-
         """
         filename = self.fshelper.getBlobFilename(oid, serial)
         if not os.path.exists(filename):
-            raise POSKeyError, "Not an existing blob."
+            return None
         return filename
 
     @non_overridable



More information about the Zodb-checkins mailing list