]> git.ipfire.org Git - thirdparty/babel.git/commitdiff
Turn PYTHON_MAGIC_COMMENT_re into byte string
authorDaniel Neuhäuser <dasdasich@gmail.com>
Sat, 6 Jul 2013 15:17:06 +0000 (17:17 +0200)
committerDaniel Neuhäuser <dasdasich@gmail.com>
Sat, 6 Jul 2013 15:17:06 +0000 (17:17 +0200)
babel/util.py

index 50f999bdd338e9e0aea5339108e3cd7798d60aa2..50aa67de8e8bfbe72d659abecdcc95b65191e4a8 100644 (file)
@@ -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.