diff options
| author | Claude Paroz <claude@2xlibre.net> | 2012-08-08 23:40:20 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2012-08-08 23:40:20 +0200 |
| commit | 96a6912ec5183e2b338bf2e1b655ea10760bfb54 (patch) | |
| tree | b94cf106bad183fec68f49ddede86bb9f92157d3 /django/core | |
| parent | 180b672a652a8ea09484d9657957fa06dbcb83a8 (diff) | |
[py3] Fixed compilemessages tests
Diffstat (limited to 'django/core')
| -rw-r--r-- | django/core/management/commands/compilemessages.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/django/core/management/commands/compilemessages.py b/django/core/management/commands/compilemessages.py index fdc3535cf6..b7392b9173 100644 --- a/django/core/management/commands/compilemessages.py +++ b/django/core/management/commands/compilemessages.py @@ -1,3 +1,5 @@ +from __future__ import unicode_literals + import codecs import os import sys @@ -7,7 +9,7 @@ from django.core.management.base import BaseCommand, CommandError def has_bom(fn): with open(fn, 'rb') as f: sample = f.read(4) - return sample[:3] == '\xef\xbb\xbf' or \ + return sample[:3] == b'\xef\xbb\xbf' or \ sample.startswith(codecs.BOM_UTF16_LE) or \ sample.startswith(codecs.BOM_UTF16_BE) |
