Transform tree data to `bytes`.
The data in the tree test cannot be automatically converted to `bytes` as a encoding is necessary in that case: ```python Traceback (most recent call last): File "/srv/slapgrid/slappart66/git/pygolang/golang/__init__.py", line 125, in _ return f(*argv, **kw) File "/srv/slapgrid/slappart66/git/wendelin.core/wcfs/internal/xbtree/xbtreetest/treegen.py", line 281, in TreesSrv zblk.setblkdata(v2) File "/srv/slapgrid/slappart66/git/wendelin.core/bigfile/file_zodb.py", line 294, in setblkdata blkdata = bytes(buf) # FIXME does memcpy TypeError: string argument without an encoding ``` As we know that the data is ASCII, we use the ASCII encoder to convert it to `bytes`.
Showing