Jérome Perrin
authored
Some objects, in our case BTrees.Length.Length in a ZODB connection
have a __str__ method that returns unicode on python2:
u'<BTrees.Length.Length object at 0x7f850932e0d0 oid 0x1e334 in <Connection at 7f854bc0f190>>'
They cause an unicode error in the history view when they are
concatenated together with other str (encoded as UTF-8) properties,
this can be observed when using history view with a "folderish"
document (but not with a File as in test_ZODBHistoryBinaryData).
To prevent this issue, we use the fact that ''.format unlike '' %
seem to apply a str() on arguments and use it instead.
Co-authored-by:
Yusei Tahara <yusei@nexedi.com>
Name | Last commit | Last update |
---|---|---|
bt5 | ||
erp5 | ||
product | ||
scalability_test | ||
slapos | ||
tests | ||
.gitignore | ||
.gitmodules | ||
CHANGES.erp5.util.txt | ||
MANIFEST.in | ||
Products | ||
README.erp5.util.txt | ||
setup.py |