diff --git a/pagure/lib/__init__.py b/pagure/lib/__init__.py index 9ac83f8..92bd1a7 100644 --- a/pagure/lib/__init__.py +++ b/pagure/lib/__init__.py @@ -3490,7 +3490,7 @@ def could_be_text(text): try: text.decode('utf-8') return True - except UnicodeDecodeError: + except (UnicodeDecodeError, UnicodeEncodeError): return False