Commit 93992272 authored by Christian Theune's avatar Christian Theune

Fixed bug #190884: Wrong reference to `POSKeyError` caused NameError.

parent ce252850
......@@ -33,6 +33,8 @@ General
ZEO
---
- (???) Fixed bug #190884: Wrong reference to `POSKeyError` caused NameError.
- (???) Fixed bug in transaction buffer: a tuple was unpacked incorrectly in
`clear`.
......
......@@ -973,7 +973,7 @@ class ClientStorage(object):
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 @@ class ClientStorage(object):
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
......
......@@ -678,6 +678,11 @@ class BlobWritableCacheTests(GenericTests, CommonBlobTests):
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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment