#1802 Fix displaying binary files in the documentation
Merged by pingou. Opened by pingou.
fix_docs  into  master

Download 1802.patch

This was caused by a change to __get_tree_and_content which tries to
convert the file and for this tries to guess the encoding. Of course
for binary files (such as images) this fails and we were ending up
with a 500 error.

With this change, we first check if the file is a binary and if it is
we just display it as such without trying to convert it.

why not use this? http://www.pygit2.org/objects.html#pygit2.Blob.is_binary

It's behavior changed, something that in some versions was returning True, has been returning False in other versions.

:thumbsup:

rebased

Thanks for the review :)

Pull-Request has been merged by pingou

Metadata