-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
In python 3.6.2 when writing a string to a file directly like this:
volume = gfapi.Volume('server', 'volume') volume.mount() with volume.fopen('testfile', 'w') as f: f.write("test write")
The resulting file gets weirdly cut like this:
xxd testfile 00000000: 7400 0000 6500 0000 7300 00 t...e...s..
This works:
with volume.fopen('testfile', 'w') as f: f.write(b'test write') xxd testfile 00000000: 7465 7374 2077 7269 7465 test write
Maybe the write function should throw a type error in Python 3 if the object is not a bytearray/byte?
Metadata
Metadata
Assignees
Labels
No labels