From: Daniel Neuhäuser Date: Sat, 6 Jul 2013 15:17:06 +0000 (+0200) Subject: Turn PYTHON_MAGIC_COMMENT_re into byte string X-Git-Tag: 1.0~88^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd11d33866b30bd23ae54b288b12af99558f882a;p=thirdparty%2Fbabel.git Turn PYTHON_MAGIC_COMMENT_re into byte string --- diff --git a/babel/util.py b/babel/util.py index 50f999bd..50aa67de 100644 --- a/babel/util.py +++ b/babel/util.py @@ -50,7 +50,7 @@ def distinct(iterable): # Regexp to match python magic encoding line PYTHON_MAGIC_COMMENT_re = re.compile( - r'[ \t\f]* \# .* coding[=:][ \t]*([-\w.]+)', re.VERBOSE) + br'[ \t\f]* \# .* coding[=:][ \t]*([-\w.]+)', re.VERBOSE) def parse_encoding(fp): """Deduce the encoding of a source file from magic comment.