Commit c9e7d3e7 authored by Tim Peters's avatar Tim Peters

referencesf(): Use %r instead of %s format in the error message, else

the pickle shown is full of unprintable characters.
parent a1b891b5
...@@ -39,6 +39,13 @@ _Persistence.c ...@@ -39,6 +39,13 @@ _Persistence.c
has its own copy, and the C code hadn't been compiled in ZODB since before has its own copy, and the C code hadn't been compiled in ZODB since before
ZODB 3.3. ZODB 3.3.
Error reporting
---------------
- In the unlikely event that ``referencesf()`` reports an unpickling error
(for example, a corrupt database can cause this), the message it
produces no longer contains unprintable characters.
What's new in ZODB3 3.4b1? What's new in ZODB3 3.4b1?
========================== ==========================
......
...@@ -514,7 +514,7 @@ def referencesf(p, rootl=None): ...@@ -514,7 +514,7 @@ def referencesf(p, rootl=None):
u.persistent_load = [] u.persistent_load = []
u.noload() u.noload()
if len(p) > f.tell(): if len(p) > f.tell():
raise ValueError, 'Error unpickling, %s' % p raise ValueError, 'Error unpickling %r' % p
# References may be: # References may be:
......
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