[Zodb-checkins] SVN: ZODB/branches/3.8/ Fixed bug #190884: Wrong reference to `POSKeyError` caused NameError.

Christian Theune ct at gocept.com
Mon Feb 11 05:05:13 EST 2008


Log message for revision 83744:
  Fixed bug #190884: Wrong reference to `POSKeyError` caused NameError.
  

Changed:
  U   ZODB/branches/3.8/NEWS.txt
  U   ZODB/branches/3.8/src/ZEO/ClientStorage.py
  U   ZODB/branches/3.8/src/ZEO/tests/testZEO.py

-=-
Modified: ZODB/branches/3.8/NEWS.txt
===================================================================
--- ZODB/branches/3.8/NEWS.txt	2008-02-11 09:49:19 UTC (rev 83743)
+++ ZODB/branches/3.8/NEWS.txt	2008-02-11 10:05:12 UTC (rev 83744)
@@ -33,6 +33,8 @@
 ZEO
 ---
 
+- (???) Fixed bug #190884: Wrong reference to `POSKeyError` caused NameError.
+
 - (???) Fixed bug in transaction buffer: a tuple was unpacked incorrectly in
   `clear`.
 

Modified: ZODB/branches/3.8/src/ZEO/ClientStorage.py
===================================================================
--- ZODB/branches/3.8/src/ZEO/ClientStorage.py	2008-02-11 09:49:19 UTC (rev 83743)
+++ ZODB/branches/3.8/src/ZEO/ClientStorage.py	2008-02-11 10:05:12 UTC (rev 83744)
@@ -973,7 +973,7 @@
         if self.shared_blob_dir:
             # We're using a server shared cache.  If the file isn't
             # here, it's not anywhere.
-            raise POSKeyError("No blob file", oid, serial)
+            raise POSException.POSKeyError("No blob file", oid, serial)
 
         # First, we'll create the directory for this oid, if it doesn't exist. 
         targetpath = self.fshelper.getPathForOID(oid)
@@ -1028,11 +1028,10 @@
                 return blob_filename
 
             # Ask the server to send it to us.  When this function
-            # returns, it will have been sent. (The recieving will
+            # returns, it will have been sent. (The receiving will
             # have been handled by the asyncore thread.)
 
             self._server.sendBlob(oid, serial)
-
             if self._have_blob(blob_filename, oid, serial):
                 return blob_filename
 

Modified: ZODB/branches/3.8/src/ZEO/tests/testZEO.py
===================================================================
--- ZODB/branches/3.8/src/ZEO/tests/testZEO.py	2008-02-11 09:49:19 UTC (rev 83743)
+++ ZODB/branches/3.8/src/ZEO/tests/testZEO.py	2008-02-11 10:05:12 UTC (rev 83744)
@@ -678,7 +678,12 @@
         self.shared_blob_dir = True
         super(BlobWritableCacheTests, self).setUp()
 
+    def checkLoadNonExistingBlob(self):
+        # Regression test for #189542
+        self.assertRaises(ZODB.POSException.POSKeyError,
+                          self._storage.loadBlob, 'foo', 'foo')
 
+
 class StorageServerClientWrapper:
 
     def __init__(self):



More information about the Zodb-checkins mailing list