-
Notifications
You must be signed in to change notification settings - Fork 98
Closed
Description
fsoids script fails reporting the shortened tid description on Python 3
What I did:
I ran the fsoids script passing one oid:
$ ./bin/fsoids components/zeo/var/filestorage/Data.fs 18104
What I expect to happen:
I expected this output:
$ ./bin/fsoids components/zeo/var/filestorage/Data.fs 18104
oid 0x46b8 ZODB.blob.Blob 2 revisions
tid 0x03e1ec746d9d5a77 offset=32500086 2021-08-06 13:40:25.690936
tid user=b' ale'
tid description=b'/Plone/workspaces/open ... 787f6b6dfe6f.jpeg/index_html'
new revision ZODB.blob.Blob at 32501238
new revision ZODB.blob.Blob at 32501305
referenced by 0x46b7 plone.namedfile.file.NamedBlobImage at 32500855
What actually happened:
oid 0x46b8 ZODB.blob.Blob 2 revisions
tid 0x03e1ec746d9d5a77 offset=32500086 2021-08-06 13:40:25.690936
tid user=b' ale'
Traceback (most recent call last):
File "./bin/fsoids", line 319, in <module>
sys.exit(ZODB.scripts.fsoids.main())
File "/home/ale/.buildout/eggs/ZODB-5.6.0-py3.8.egg/ZODB/scripts/fsoids.py", line 76, in main
c.report()
File "/home/ale/.buildout/eggs/ZODB-5.6.0-py3.8.egg/ZODB/FileStorage/fsoids.py", line 120, in report
print(" tid description=%r" % shorten(description))
File "/home/ale/.buildout/eggs/ZODB-5.6.0-py3.8.egg/ZODB/FileStorage/fsoids.py", line 32, in shorten
return s[:nleading] + " ... " + s[-ntrailing:]
TypeError: can't concat str to bytes
What version of Python and Zope/Addons I am using:
- Python 3.8
- ZODB-5.6.0
- Zope-4.6.3
- Plone-5.2.5
Metadata
Metadata
Assignees
Labels
No labels