We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 19afa44 commit 6ace81bCopy full SHA for 6ace81b
1 file changed
ietf/utils/validators.py
@@ -1,7 +1,9 @@
1
-# -*- python -*-
2
# Copyright The IETF Trust 2016-2019, All Rights Reserved
+# -*- coding: utf-8 -*-
3
4
5
+from __future__ import absolute_import, print_function, unicode_literals
6
+
7
import os
8
import re
9
import magic
@@ -77,7 +79,7 @@ def validate_mime_type(file, valid):
77
79
mime_type, encoding = get_mime_type(raw)
78
80
# work around mis-identification of text where a line has 'virtual' as
81
# the first word:
- if mime_type == 'text/x-c++' and re.search(rb'(?m)^virtual\s', raw):
82
+ if mime_type == 'text/x-c++' and re.search(br'(?m)^virtual\s', raw):
83
mod = raw.replace(b'virtual', b' virtual')
84
mime_type, encoding = get_mime_type(mod)
85
if valid and not mime_type in valid:
0 commit comments