Skip to content

Commit 6ace81b

Browse files
committed
Corrected the order of string prefix 'r' and 'b' under python2.
- Legacy-Id: 16445
1 parent 19afa44 commit 6ace81b

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

ietf/utils/validators.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
# -*- python -*-
21
# Copyright The IETF Trust 2016-2019, All Rights Reserved
2+
# -*- coding: utf-8 -*-
33

44

5+
from __future__ import absolute_import, print_function, unicode_literals
6+
57
import os
68
import re
79
import magic
@@ -77,7 +79,7 @@ def validate_mime_type(file, valid):
7779
mime_type, encoding = get_mime_type(raw)
7880
# work around mis-identification of text where a line has 'virtual' as
7981
# the first word:
80-
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):
8183
mod = raw.replace(b'virtual', b' virtual')
8284
mime_type, encoding = get_mime_type(mod)
8385
if valid and not mime_type in valid:

0 commit comments

Comments
 (0)