diff --git a/pagure/lib/__init__.py b/pagure/lib/__init__.py index 4ba145a..195c37f 100644 --- a/pagure/lib/__init__.py +++ b/pagure/lib/__init__.py @@ -2371,6 +2371,4 @@ def clean_input(text): def is_binary(text): """ Returns wether we think this text correspond to a binary file or not """ - textchars = bytearray([7,8,9,10,12,13,27]) + bytearray(range(0x20, 0x100)) - is_binary_string = lambda bytes: bool(bytes.translate(None, textchars)) - return is_binary_string(text) + return '\0' in text