mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Fix fetch_data on python 3
This commit is contained in:
@@ -76,6 +76,8 @@ def stream_to_open_named_file(stream, fd, filename, source_encoding=None, source
|
||||
else:
|
||||
# Compressed files must be encoded after they are uncompressed in the upload utility,
|
||||
# while binary files should not be encoded at all.
|
||||
if isinstance(chunk, text_type):
|
||||
chunk = chunk.encode(target_encoding, target_error)
|
||||
os.write(fd, chunk)
|
||||
os.close(fd)
|
||||
return filename
|
||||
|
||||
Reference in New Issue
Block a user