Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docker.get_file for binary files #1076

Merged
merged 1 commit into from
May 11, 2024

Commits on Mar 21, 2024

  1. 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).
    matthijskooijman committed Mar 21, 2024
    Configuration menu
    Copy the full SHA
    65db628 View commit details
    Browse the repository at this point in the history