diff --git a/ietf/utils/validators.py b/ietf/utils/validators.py index c982fccfa..8ad5a6466 100644 --- a/ietf/utils/validators.py +++ b/ietf/utils/validators.py @@ -1,7 +1,9 @@ -# -*- python -*- # Copyright The IETF Trust 2016-2019, All Rights Reserved +# -*- coding: utf-8 -*- +from __future__ import absolute_import, print_function, unicode_literals + import os import re import magic @@ -77,7 +79,7 @@ def validate_mime_type(file, valid): mime_type, encoding = get_mime_type(raw) # work around mis-identification of text where a line has 'virtual' as # the first word: - if mime_type == 'text/x-c++' and re.search(rb'(?m)^virtual\s', raw): + if mime_type == 'text/x-c++' and re.search(br'(?m)^virtual\s', raw): mod = raw.replace(b'virtual', b' virtual') mime_type, encoding = get_mime_type(mod) if valid and not mime_type in valid: