Commit 44ff889b authored by Tres Seaver's avatar Tres Seaver

Merge pull request #2 from toutpt/master

Improve logging of issue around blob
parents c327f1c7 27870c2a
......@@ -2,6 +2,12 @@
Change History
================
4.0.0.dev (unreleased)
======================
- Include the filename in the exception message to support debugging in case
loadBlob does not find the file.
4.0.0a4 (2012-12-17)
=====================
......@@ -309,7 +315,7 @@ Bugs fixed
their subconnections weren't cleaned up properly.
- ZEO didn't work with IPv6 addrsses.
Added IPv6 support contributed by Martin v. Löwis.
Added IPv6 support contributed by Martin v. L�wis.
- A file storage bug could cause ZEO clients to have incorrect
information about current object revisions after reconnecting to a
......
......@@ -642,7 +642,7 @@ class BlobStorageMixin(object):
"""
filename = self.fshelper.getBlobFilename(oid, serial)
if not os.path.exists(filename):
raise POSKeyError("No blob file", oid, serial)
raise POSKeyError("No blob file at %s" % filename, oid, serial)
return filename
def openCommittedBlobFile(self, oid, serial, blob=None):
......
......@@ -394,7 +394,7 @@ And we shouldn't be able to read the data that we saved:
>>> blob_storage.loadBlob(blob._p_oid, s1)
Traceback (most recent call last):
...
POSKeyError: 'No blob file'
POSKeyError: 'No blob file at /var/blobs/0x00/0x039bfdeeb0364777.blob'
Of course the old data should be unaffected:
......@@ -411,7 +411,7 @@ Similarly, the new object wasn't added to the storage:
>>> blob_storage.loadBlob(blob._p_oid, s2)
Traceback (most recent call last):
...
POSKeyError: 'No blob file'
POSKeyError: 'No blob file at /var/blobs/0x00/0x039bfdeeb0364777.blob'
.. clean up
......
......@@ -682,6 +682,9 @@ def storage_reusable_suite(prefix, factory,
"blob_connection.txt", "blob_importexport.txt",
"blob_transaction.txt",
setUp=setup, tearDown=zope.testing.setupstack.tearDown,
checker=zope.testing.renormalizing.RENormalizing([
(re.compile(r'/.*/blobs/.*\.blob'), '<BLOB STORAGE PATH>')
]),
optionflags=doctest.ELLIPSIS,
))
if test_packing:
......
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