Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix docker.get_file for binary files
The file to get is copied to a temp file, and then opened to read into memory. This would open the file in text mode (the default), which would fail on binary files that could not be decoded as utf8. This changes the file opening to use binary mode. It also simplifies the rest of the code, which would try to handle both strings and bytes, but this is likely a remnant of py2 code (or the maybe copied from files.put where the passed file could possibly be a stream in text mode).
- Loading branch information