Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SinglefileData
: Add mode
keyword to get_content
This allows a user to retrieve the content in bytes. Currently, a user is forced to use the more elaborate form: with singlefile.open(mode='rb') as handle: content = handle.read() or go directly through the repository interface which is a bit hidden and requires to redundantly specify the filename: content = singlefile.base.repository.get_object_content( singlefile.filename, mode='rb' ) these variants can now be simplified to: content = singlefile.get_content('rb')
- Loading branch information